InidBIX.com
Arithmetic Aptitude Data Interpretation
Logical Reasoning Verbal Reasoning
General Knowledge
Sudoku Number puzzles Missing letters puzzles Logical puzzles Playing cards puzzles Clock puzzles
C Programming Java Programming
Data Structures Operating Systems Networking DATABASE Database Basics SQL Server Basics SQL Server Advanced SQL Server 2008 JAVA Core Java Java Basics Advanced Java UNIX Unix File Management Unix Memory Management Unix Process Managemnt
Aptitude Test Verbal Ability Test Verbal Reasoning Test Logical Reasoning Test C Programming Test Java Programming Test Data Interpretation Test General Knowledge Test
Group Disucssion HR Interview Questions Technical Interview Questions Body Language
"I never see what has been done; I only see what remains to be done."
- Marie Curie

C Programming - Pointers - Discussion

@ : Home > C Programming > Pointers > General Questions - Discussion
2. 

Can you combine the following two statements into one?

char *p;
p = (char*) malloc(100);

[A]. char p = *malloc(100);
[B]. char *p = (char) malloc(100);
[C].
char *p = (char*)malloc(100);
[D]. char *p = (char *)(malloc*)(100);

Answer: Option C

Explanation:

No answer description available for this question.


Siva Test said: (Sun, Jun 20, 2010 06:50:18 PM)    
 
first one

Siva Test said: (Sun, Jun 20, 2010 06:50:28 PM)    
 
Second One

Lingarajathi said: (Mon, Jun 21, 2010 09:14:27 AM)    
 
Hello Mr/Ms
i need clear details about pointers and pointers memory allocation, can u send me this me the details.

Lingarajathi said: (Mon, Jun 21, 2010 09:14:27 AM)    
 
Hello Mr/Ms
i need clear details about pointers and pointers memory allocation, can u send me this me the details.

Mahesh said: (Wed, Jul 7, 2010 12:09:49 PM)    
 
here we have to allocate space for characters.so first we have to do typecasting i.e(char *)
if we give (char) it gives error because we are using pointer.
then we allocate memory space by malloc

Tj015 said: (Wed, Jul 7, 2010 06:06:23 PM)    
 
online complier great , can somebody tell me what are the prerequisite for makin online complier .

Chinna said: (Wed, Jul 21, 2010 05:53:36 AM)    
 
if there is allocated space in char p

Chandana said: (Thu, Jul 29, 2010 07:45:47 PM)    
 
thanks mahesh

Nagarajan said: (Tue, Aug 24, 2010 02:43:24 PM)    
 
I want clear details from pointers with example.

Write your comments here:


© 2008-2010 by IndiaBIX™ Technologies. All Rights Reserved | Copyright | Terms of Use & Privacy Policy