NEW
Font size
WorksheetsPPS - Chapter 7,8,9,10
Total questions: 60
Worksheet time: 3hrs 0mins
Comment on the following pointer declaration. int *ptr, p;
ptr is a pointer to integer, p is not
ptr and p, both are pointers to integer
ptr is a pointer to integer, p may or may not be
ptr and p both are not pointers to integer
Comment on the following C statement. const int *ptr;
You cannot change the value pointed by ptr
You cannot change the pointer ptr itself
You May or may not change the value pointed by ptr
You can change the pointer as well as the value pointed by it
An array of strings can be initialized by _________
char *a[] = {“Hello”, “World”};
char *a[] = {“Hello”, “Worlds”};
char *b = "Hello"; char *c = "World"; char *a[] = {b, c};
all of the mentioned
What will be the output of the C code if the input entered as first and second number is 5 and 6 respectively?
56
Address of the locations where the two numbers are stored
57
Error
Which of the following functions allocates multiple blocks of memory, each block of the same size?
malloc()
realloc()
calloc()
free(0)
error
welcome
memory location stored by the pointer
junk value
2
4
1
7
Which of the following statements correct about the below code? maruti.engine.bolts=25;
Structure bolts is nested within structure engine.
Structure engine is nested within structure maruti.
Structure maruti is nested within structure engine.
Structure maruti is nested within structure bolts.
Compile time error
sizeof(int) + sizeof(char)
Depends on the compiler
sizeof(int)
