InidBIX.com
Arithmetic Aptitude Data Interpretation
Logical Reasoning Verbal Reasoning
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
Group Disucssion HR Interview Questions Technical Interview Questions Body Language

Exercise

"It takes a very long time to become young."
- Pablo Picasso

C Programming - Pointers

@ : Home > C Programming > Pointers > General Questions
1. 

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);

2. 

Can you write the another expression which does the same job as ++*ptr?

A.
(*ptr)++
B. ++*(ptr)
C. (ptr)*++D. (ptr)++*

3. 

What would be the equivalent pointer expression for referring the array element a[i][j][k][l]

A. ((((a+i)+j)+k)+l)B.
*(*(*(*(a+i)+j)+k)+l)
C. (((a+i)+j)+k+l)D. ((a+i)+j+k+l)

4. 

If a variable is a pointer to a structure, then which of the following operator is used to access data members of the structure through the pointer variable?

A. '.'B. '&'
C. '*'D.
'->'

5. 

The operator used to get value at address stored in a pointer variable is

A.
*
B. &
C. &&D. ||



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