C Programming Online Test – Multiple Choice Questions and Answers 1. What do the following declaration signify? char *arr[10]; arr is a pointer to array of characters arr is a array of function pointer arr is a array of 10 character pointers arr is a array of characters 2. The library function used to find the last occurrence of a character in a string is strnstr() laststr() strstr() strrchr() 3. Declare the following statement? “A pointer to a function which receives an int pointer and returns float pointer” float *(*ptr)(int) float *(ptr)*int; float *(*ptr)(int*) float (*ptr)(int) 4. Which of the following are unary operators in C? 1. ! 2. sizeof 3. ~ 4. && 1, 2 1, 2, 3 1, 3 2, 4 5. What do the ‘c’ and ‘v’ in argv stands for? ‘c’ means argument count ‘v’ means argument vector ‘c’ means argument control ‘v’ means argument vector ‘c’ means argument count ‘v’ means argument vertex ‘c’ means argument configuration ‘v’ means argument visibility 6. Declare the following statement? “A pointer to a function which receives nothing and returns nothing” void *(ptr)*int; void *(*ptr)(*) void *(*ptr)() void (*ptr)() 7. What do the following declaration signify? void *cmp(); cmp is a function that return a void pointer cmp is a void type pointer variable cmp is a pointer to an void type cmp function returns nothing 8. Which of the following is the correct order if calling functions in the below code? a = f1(23, 14) * f2(12/4) + f3(); Order may vary from compiler to compiler f3, f2, f1 f1, f2, f3 None of above 9. The maximum combined length of the command-line arguments including the spaces between adjacent arguments is 67 characters 128 characters 256 characters It may vary from one operating system to another 10. Which of the following function is used to find the first occurrence of a given string in another string? strchr() strnset() strstr() strrchr() Loading … Question 1 of 10