C MCQ's
C MCQ's
c) CamelCase letters
d) None
d) int $main;
d) Cannot be determined
d) #define PI 3.14
8. Which keyword is used to prevent any changes in the variable within a C program?
a) immutable
b) mutable
c) const
d) volatile
9. A variable declared in a function can be used in main
a) True
b) False
c) True if it is declared static
d) None of the mentioned
10. Which escape character can be used to beep from speaker in C?
A) \a
B) \b
C) \m
D) \n
11. Explicit type conversion is known as ....................
A) casting
B) conversion
C) disjunction
D) separation
12. If a is an integer variable, a=7/3; will return a value
A) 2.5
B) 3
C) 0
D) 2
13. Hierarchy(Operator Precedence) decides which operator
B. = * / % + -
C. / * % - + =
D. * % / - + =
2.Arithmetic
B.1234
3.Logical
C.4321
4. Assignment
D.3214
C- Objectives (SET-2)
1. Which of the following cannot be checked in a switch-case statement?
A. Character
B.Integer
C.
Float
D.
enum
2) if a > b ;
3)goto
4)If
c) if (a>b) { ;}
d)none
2) 1
3)2
2) 0
3)10
4)100
d)none
b)getch()
c)getche()
d)scanf()
b)pow(3,2)
c)pow(c)
d)none
b)integers
c)double
10) A single character input from the keyboard can be obtained by using the function.
(A) printf ( )
(B) scanf ( )
(C) putchar ( )
(D) getchar ( )
11)The variable that are declared outside all the functions are called ______.
(A) Local variable
b)switch
c) Else if ladder
b)1
c)9
d)Infinite
b)while
c)do
d)none
b) switch
c)Do
d)While
d)nested-if
C- Objectives (SET-3)
1)what is the default return type of a function ?
a)void
b)int
c)float
d)char
b)call by ref
c)both
c)none
b)argv
c)none
d)both
c)Header information
b)nested function
c)function prototype
b)calling function
c)called function
b)calling function
c)called function
b)calling function
c)called function
b)calling function
c)called function
d)recursive function
b)recursion
c)indirection
d)prototyping
b)matrix
c)string
b)zero matrix
c)sparse matrix
b)variable
c) index
b)one
c) -1
b) 10
c)11
d)8
18)If table[5][7] is an array , how many values can be stored by this array ?
a)12
b)5
c)7
d)35
b)6
c)24
d)10
C- Objectives (SET-4)
Q.1)Arrays are used to store elements of :a)Same type
b) multiple type
c)different type
d)none
b)Function
c)Array
d)All
b)nibbles
c)words
d)bytes
b)puts()
c)printf()
d)getch()
b)register
c)static
d)extern
q.6) In which storage class , the variable is not stored in main memory :
a) a)auto
b)register
c)static
d)extern
b)**
c).
d)#
b)static
c)address of
d)function
b)*
c).
d)#
b)*
c).
d)#
b)*
c).
d)#
b)*
c).
d)#
b)base address
c)array address
b)No
b)pointer-to-pointer
c)void pointer
b)addition
c)comparison
b)void pointer
c)data pointer
b)void pointer
c)data pointer
C- Objectives (SET-5)
1)
2)
d)fgetc()
b)fgets()
c)fscanf() d)fprintf()
b)rewind()
c)fseek()
b)random
b)structure c)pointer
b)fscanf()
[b]Pointer operator(*)
[c]Arrow operator(->)
B.free(var-name);
D.dalloc(var-name);
b)structure
10)If the value is not assigned to variable , which will give a garbage value ?
a) static
b)auto
c)extern
b)extern
b)extern