C Language - Pointers

You Are Here :: Home > C Language > Pointers - General Questions

 
55.

What will be output when you will execute following c code?

#include
void main(){
static int a=2,b=4,c=8;
static int *arr1[2]={&a,&b};
static int *arr2[2]={&b,&c};
int* (*arr[2])[2]={&arr1,&arr2};
printf("%d %d\t",*(*arr[0])[1], *(*(**(arr+1)+1)));
}
Choose all that apply:

A. 2 4 B. 2 8
C. 4 2 D. 4 8




56.

int *x;

int y,t=-1;
int *w,*z=&y;
x=&y;
The value of *x is

A. the address of y B. -1
C. 0 D. garbage




57.

int *x;

int y,t=-1;
int *w,*z=&y;
x=&y;
The value of *y is _.

A. garbage B. an error, since y cannot be dereferenced
C. -1 D. 0




58.

int *x;

int y,t=-1;
int *w,*z=&y;
x=&y;
Which of the following would represent the value of -1?

A. *t B. &t
C. *x D. *&t




59.

int *x;

int y,t=-1;
int *w,*z=&y;
x=&y;
The type of *x is

A. a type that cannot be determined B. int
C. long int D. pointer to an int




60.

The type of &y is

int *x;
int y,t=-1;
int *w,*z=&y;
x=&y;

A. type that cannot be determined B. int
C. long int D. pointer to an int




« previous

10

11

12

next »

 
 
 



© 2013 freshersindia.in ® | Copyrights | Terms & Conditions
   Designed by Freshers India
Catch Us on