II-202 Programming Concepts
32. The pointer can hold the address of
(a) a variable (b) address of address of a variable and so on
(c) points to a particular memory location (d) All of these
33. Which is incorrect
(a) The pointer is variable and cannot be made constant
(b) One type of pointer cannot hold the data with other data type
(c) The value in one location cannot be copied to another location using pointer
(d) All of these
34. Which segment is valid
(a) char *names[] = {"Rahul","Sachin"};
(b) char *names = {"Rahul","Sachin"};
(c) char **names = {"Rahul","Sachin"};
(d) All are valid
35. Choose the correct output.
void main()
{
int a[2][3][2] = {{{2,4},{7,8},{3,4}},{{2,2},{2,3},
{3,4}}};
clrscr();
printf("%u %u %u %d
",a,*a,**a,***a);
getch();
}
(Assume the starting address 2000)
The output is
(a) 2000 2000 2000 2 (b) 2000 2002 2002 2
(c) 2000 2002 2004 2 (d) 2000 2 2 2
36. Choose the correct output.
void main()
{
int a[2][3][2] = {{{2,4},{7,8},{3,4}},{{2,2},{2,3},{3,4}}
};
clrscr();
printf("%u %u %u %d
",a+1,*a+1,**a+1,***a+1);
getch();
}
(Assume the starting address 2000)
M09_ITL-ESL4791_02_SE_C09.indd 202 12/22/2012 5:04:02 PM