GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Placement Papers  >  Sonata  >  C
Go To First  |  Previous Question  |  Next Question 
 C  |  Question 30 of 31    Print  
On combining the following statements, you will get char*p; p=malloc(100);
a) char *p= malloc(100) b) p= (char*)malloc(100)
c) All of the above d) None of the above


  
Total Answers and Comments: 2 Last Update: March 27, 2006   
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
October 23, 2005 18:10:44   #1  
shrutimitra Member Since: October 2005   Contribution: 16    

RE: On combining the following statements, you will g...
c) All of the above
 
Is this answer useful? Yes | No
March 27, 2006 09:21:00   #2  
krishan pratap        

RE: On combining the following statements, you will g...
The answer would be Because the Their is a need of the decleration the this is the character type of the pointer.
 
Is this answer useful? Yes | No

 Related Questions

In the following code; #include main() { FILE *fp; fp= fopen("trial","r"); } fp points to: a) The first character in the file. b) A structure which contains a "char" pointer which points to the first character in the file. c) The name of the file. d) None of the above.
Tags : Pointer

If the program (myprog) is run from the command line as myprog 1 2 3 , What would be the output? main(int argc, char *argv[]) { int i; for(i=0;i

If the following program (myprog) is run from the command line as myprog 1 2 3, What would be the output? main(int argc, char *argv[]) { int i,j=0; for(i=0;i

If the following program (myprog) is run from the command line as myprog monday tuesday wednesday thursday, What would be the output? main(int argc, char *argv[]) { while(--argc >0) printf("%s",*++argv); } a) myprog monday tuesday wednesday thursday b) monday tuesday wednesday thursday c) myprog tuesday thursday d) None of the above

No difference  
Latest Answer : No difference. const either refers to the item on it's left, or if there is no item on the left, to the item on the right. So both lines declare s as a variable pointer to a constant character. ...

What is the difference between the following declarations? const char *const s; char const *const s;
No difference  

What would be the output of the following program? main() { char near * near *ptr1; char near * far *ptr2; char near * huge *ptr3; printf("%d %d %d",sizeof(ptr1),sizeof(ptr2),sizeof(ptr3)); } a) 1 1 1 b) 1 2 4 c) 2 4 4 d) 4 4 4

If the following program (myprog) is run from the command line as myprog friday tuesday sunday, What would be the output? main(int argc, char*argv[]) { printf("%c",**++argv); } a) m b) f c) myprog d) friday

If the following program (myprog) is run from the command line as myprog friday tuesday sunday, What would be the output? main(int argc, char *argv[]) { printf("%c",*++argv[1]); } a) r b) f c) m d) y

If the following program (myprog) is run from the command line as myprog friday tuesday sunday, What would be the output? main(int argc, char *argv[]) { while(sizeofargv) printf("%s",argv[--sizeofargv]); } a) myprog friday tuesday sunday b) myprog friday tuesday c) sunday tuesday friday myprog d) sunday tuesday friday


 Sponsored Links

 
Related Articles

C++ Decision Making Statements

C Decision Making Statements In this C tutorial you will learn about decision making statements if statement if… else statement switch statement conditional operator along with syntax and examples mosgoogle center Decision making is an important concept in any programming language and to
 

What is Data Characteristics

Data characteristics are defined during data modeling, a process where a data model is created by applying a data model theory in order to create a data model instance. A data model theory is a formal description of a data model. Data modeling is also a process of structuring data and organizing d
 

exit and return statements

  How does the exit () and return () differ exit () is used to exit the program as a whole. In other words it returns control to the operating system. After exit () all memory and temporary storage areas are all flushed out and control goes out of program. In contrast, the return () stateme
 

JavaScript Conditional Statements Part 2

JavaScript Conditional Statements Part 2 In continuation of JavaScript Conditional Statements Part 1 this tutorial will help you learn about remaining conditional statements in JavaScript if else if else statement and switch statement mosgoogle if else if else statement If there are many branching o
 

JavaScript Conditional Statements Part 1

JavaScript Conditional Statements Part 1 In this JavaScript tutorial you will learn about the conditional statements available in JavaScript for decision making if statement and if else statement mosgoogle Just like any other programming language conditional statements in JavaScript are used for de
 

Web 2.0 Characteristics

Web 2 0 Characteristics While Web 2 0 is one of the most promising technological advances that will occur on the Internet there is a lot of confusion that surrounds it While you may think this confusion is limited to laypersons this is not the case mosgoogle Many Web 2 0 experts are confused about t
 

PHP Tutorials - Conditional Statements

PHP Tutorials Conditional Statements In this PHP Tutorials you will learn about Conditional Statements if statement if else statement Alternative if else statement  and  switch statement mosgoogle if statement if syntax is as follows if an expression that return Boolean value
 

WebSphere V5.0 : Creating SQL statements

WebSphere V5 0 Creating SQL statements In this tutorial you will learn about WebSphere V5 0 Creating SQL statements SQL query builder Use Query builder to generate queries mosgoogle Use query builder to generate queries Creating SQL statements You can create an SQL statement using either the SQL que
 

C Programming - Handling of character string

C Programming Handling of character string In this tutorial you will learn about Initializing Strings Reading Strings from the terminal Writing strings to screen Arithmetic operations on characters String operations string h Strlen function strcat function strcmp function strcmpi function strcpy fun
 

Oracle Apps 11i: Setting up Chart Of Accounts (COA)

Oracle Apps 11i Free Training Setting up Chart Of Accounts COA In this tutorial you will learn how to create a Chart Of Accounts COA create a new value set General Ledger List Types Security Types Format Types Validation Types Oracle GL Segments and Create the Accounting Flexfield Structure mosgoogl
 

About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape