Cprogmcq
Cprogmcq
i) Derived Data type ii) Primitive Data type iii) Custom Data type iv) None of these
12. What is the way to suddenly come out of or Quit any Loop in C Language.?
i) continue; statement
ii) break; statement
iii) leave; statement
iv) quit; statement
13. A function which calls itself is called a ___ function.
i) Self Function ii) Auto Function iii) Recursive Function iv) Static Function
14. Which function will you choose to join two words?
i) strcpy() ii) strcat() iii) strncon() iv) memcon()
15. What is a structure in C language?
i) A structure is a collection of elements that can be of same datatype
ii) A structure is a collection of elements that can be of different datatype
iii) Elements of a structure are called members
iv) All of the these
16. What will be the size of the following structure?
#include <stdio.h>
struct temp {
int a[10];
char p;
};
i) 5 ii) 11 iii) 41 iv) 44
17. A pointer is a
i) variable that stores address of an instruction
ii) variable that stores address of other variable
iii) keyword used to create variables
iv) None of these
18. Address stored in the pointer variable is of type _______.
i) integer ii) character iii) float iv) array
19. Comment on the following pointer declaration?
int *ptr, p;
i) ptr is a pointer to integer, p is not
ii) ptr and p, both are pointers to integer
iii) ptr is pointer to integer, p may or may not be
iv) ptr and p both are not pointers to integer
22.The keyword used to transfer control from a function back to the calling function is
int **a;
a) switch
b) goto
c) go back
d) return
option D
23.The keyword used to transfer control from a function back to the calling function is
int **a;
a) switch
b) goto
c) go back
d) return
option C
27. What is the 16-bit compiler allowable range for integer constants?
i) -3.4e38 to 3.4e38 ii) -32767 to 32768 iii) -32668 to 32667 iv) -32768 to
32767
28. Who is the father of C language?
i) Steve Jobs ii) James Gosling iii) Dennis Ritchie iv) Rasmus Lerdorf
29. Which of the following cannot be a variable name in C?
i) volatile ii) true iii) friend iv) export
30. Choose a correct C for loop syntax.
{
//statements
}
{
//statements
}
iii) for(declaration; increment operation; condition)
{
//statements
}
iv) for(initialization; condition; increment operation;)
{
//statements
}
33. How many number of pointer (*) does C have against a pointer variable declaration?
i) 7 ii) 127 iii) 255 iv) No limits