C Language - Pointers

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

 
13.

Declaration int *(*p) int(*a)(i) is ?

A. A pointer to a, which returns an integer B. A pointer to function that accepts an integer argument and returns an integer
C. A pointer to subroutine, which returns result of evaluation D. None of Above




14.

Null pointer and UN-initialized pointers are same ?

A. False B. None of Above
C. True D. Varies from program to program




15.

Null pointer is ?

A. A pointer which does not point anywhere B. A pointer that returns 0 values
C. None of Above D. Pointer defined with name Null




16.

What are the values of trouble and *pt after the following program fragment has been executed?

double trouble = 13.13;
double *pt;
pt = &trouble;
*pt = 9.9;

A. trouble is 13.13, *pt is 9.9 B. trouble is 9.9, *pt is 13.13
C. trouble is undefined, *pt is 9.9 D. trouble is 9.9, *pt is 9.9




17.

Consider the following program fragment, assuming the #include directive:

char saying[] = "Too many cooks spoil the broth.";
char *p1, *p2;
p1 = saying;
p2 = saying + 8;
*p2 = '\0';
printf("%s\n", saying);
What string will be printed?

A. "Too many cooks spoil the broth." B. "cooks spoil the broth."
C. "Too many" D. "Too manycooks spoil the broth."




18.

main()
{
char *p="hai friends",*p1;
p1=p;
while(*p!='\0') ++*p++;
printf("%s %s",p,p1);
}

A. ibj!jfoetgs B. foetibj!gsj
C. ibj!gsjfoet D. ib!gsjfojet




« previous

1

2

3

4

5

6

7

8

9

...

next »

 
 
 



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