1. C PROGRAMING ATPITUDE TEST
Select the right option from following
1. Which symbol is used to make comments?
a) #
b) //
c) !=
d) <!
2. #include <file> is used
a) To insert prewritten code into a current program.
b) To insert standard library.
c) None
d) To execution of a program.
3. … function is used to show output of program.
a) scanf();
b) print();
c) printf(“ ”);
d) out.print();
4. What is the output of printf (“%d”); ?
a) ”%d”
b) Code error.
c) Garbage value.
d) Null.
5. Can a variable is
a) Constant.
b) Volatile.
c) Both a and b.
d) Constant but not volatile.
6. Constant ‘A’ in C is define as
a) #A
b) #defineA
c) #define A
d) #define A;
7. Which are not invalid declarations of variable?
a) printf
b) sum
c) sum$
d) sum#
8. The default value of variable is
a) Null.
b) Zero.
c) Garbage.
d) Infinity.
9. The allowable range in 16-bit is
a) 1 byte.
b) 2 byte.
c) 4 byte.
www.samyama.co.in By Kishor B. Parkhe. Page 1
2. C PROGRAMING ATPITUDE TEST
d) 8 byte.
10. An unsigned integer can’t store
a) Positive value.
b) Negative value.
c) Zero
d) Default value.
11. The default sign of floating point is
a) Negative & positive
b) Positive
c) Undefined
d) None
12. The size of float is
a) 2-bytes
b) 8-bytes
c) 4-bytes
d) 16-bytes
13. The size of double is
a) 32-bytes
b) 8-bytes
c) 4-bytes
d) 16-bytes
14. A range of signed character is
a) 0 to 128
b) -128 to +128
c) 0 to 255
d) -128 to 255
15. A range of unsigned character is
a) -255 to 255
b) -128 to +128
c) -128 to 255
d) 0 to 255
16. ‘0’ is a string
a) Initiate string
b) Default value
c) String terminator
d) None
17. All the variable must declare
a) In main
b) Before use
c) Constant
d) Anywhere
18. The operator *, / and % have
a) Same priority
b) Less priority than binary
c) High priority than binary
www.samyama.co.in By Kishor B. Parkhe. Page 2
3. C PROGRAMING ATPITUDE TEST
d) Depend on use
19. ‘=’ is
a) Logical operator
b) Relational operator
c) Arithmetic operator
d) None
20. Which is not bitwise operator
a) &
b) |
c) ?
d) ^
21. The ‘sizeof ‘ operator return
a) Range operant
b) Memory allocated by operant
c) Both a and b
d) None
22. The sum of integer and character is
a) Integer
b) Character
c) Compilation error
d) Run time exception
23. C language have a
a) Sequence control statements
b) Decision control statements
c) Loop control statements
d) a, b, and c
24. The do… while loop execute
a) At least once
b) At most one
c) Not repetitively
d) None
25. ‘break’ is use to
a) Exit from loop
b) Exit from program
c) Exit from inner most loop
d) None
26. The standard library ‘Exit’ function is used to
a) Terminate program
b) Exit from current loop
c) Exit from outer loop
d) Both b and c
27. C program consist
a) Only main function
b) At least one function
c) At most one function
d) Only standard library function
www.samyama.co.in By Kishor B. Parkhe. Page 3
4. C PROGRAMING ATPITUDE TEST
28. The return type function in C is
a) Not required
b) Must define
c) Depend on parameter
d) none
29. Which function is called first?
a) User specify function
b) Main function
c) Standard library function
d) Sub function
30. If return type of function & data type expression does not match then
a) It give compilation error
b) Runtime exception
c) It convert in to data type of function
d) It convert in to higher data type
31. Use ‘return’ statement in void function is
a) Give fetal error
b) Illegal
c) Give exception at run time.
d) None
32. Function in C Consist
a) Limited times
b) At least once
c) At most once
d) None
33. By default the scope of variable Is
a) Local
b) Global
c) A and b
d) None
34. The variable define out site is called
a) Out variable
b) External variable
c) Outer variable
d) Local variable
35. By default value of automatic variable is
a) Null
b) Zero
c) Garbage
d) None
36. By default any variable declared in a function is
a) Static storage classes
b) Register storage classes
c) Automatic storage classes
d) External Storage classes
37. By default value of static variable is
www.samyama.co.in By Kishor B. Parkhe. Page 4
5. C PROGRAMING ATPITUDE TEST
a) Null
b) Zero
c) Garbage
d) None
38. By default value of register variable is
a) Zero
b) Null
c) Garbage
d) One
39. By default value of external variable is
a) Garbage
b) Zero
c) Null
d) 1
40. An array is a collection of
a) Different data type
b) Same data type
c) Derived data
d) None
41. An index value of an array is start from
a) 1
b) 0
c) -1
d) None
42. Arrays whose element are specified by one subscript, are called
a) One line arrays
b) Vectors
c) Single arrays
d) None
43. Find out invalid declaration of an array
a) int arr[10] ;
b) int arr[]={0} ;
c) int arr[-10] ;
d) All above are correct.
44. The size of an array ‘int arr[200]’ is
a) 400
b) 200
c) 800
d) 1600
45. int arr[3][4] ={1,12,3,4,5,6,8,9,1,10,11,33}, the value at index arr[1][0] is
a) 3
b) 4
c) 5
d) 9
46. Which is not valid declaration of an array
a) Int arr[2][4] ;
www.samyama.co.in By Kishor B. Parkhe. Page 5
6. C PROGRAMING ATPITUDE TEST
b) Int arr[2][] ;
c) Int arr[][4] ;
d) Both b and c;
47. The scanf ( ) function can’t allowed
a) Space between two character
b) Null values
c) Integer values
d) None
48. The gets () function is equivalent to
a) printf () function
b) scanf ( ) function
c) both a and b
d) none
49. The strcat ( ) function is used to
a) Subtracting two strings.
b) Finding substring
c) Concatenation of two strings
d) Compare two strings
50. Which is not a function of ‘string.h’ ?
a) printf ( ) ;
b) strcmp ( ) ;
c) strcmpy ( ) ;
d) strcat ( ) ;
51. The strlen () Function is used to
a) Find range of string
b) Calculate memory size in bytes
c) Find length of string
d) None
52. Which function is used to append the first n character of string at the end of another?
a) strcan ();
b) strapp();
c) strncan ();
d) strncmp();
53. which function are used to conversion of string ?
a) strlwr () ;
b) strupr () ;
c) strcnv () ;
d) Both a and b
54. Pointer variable consist a
a) Variable address
b) Variable type
c) Both a and b
d) Variable value
55. Which is ‘address of‘ operator?
a) $
b) &
www.samyama.co.in By Kishor B. Parkhe. Page 6
7. C PROGRAMING ATPITUDE TEST
c) &&
d) @
56. Which is ‘dereferencing’ operator?
a) *
b) @
c) &
d) ->
57. Address of first element of array is called
a) Initial element
b) Base element
c) Top element
d) None
58. Which are a valid operant on a pointer?
a) +
b) –
c) Both a and b
d) * and /
59. What is necessary declaration of pointer to a function?
a) Name of pointer
b) Data
c) Return type of function
d) Operator
60. Pointer is a
a) Constant
b) Variable
c) Sing data type
d) None
61. Array are stored in
a) Continuous in memory location
b) Discontinuous in memory location
c) Decreasing order
d) Increasing order
62. Which operator has high priority indexing operator?
a) Logical operator
b) Differencing operator
c) Data operator
d) None
63. The array int arr[10][20] is equivalent to a
a) int *arr[10]
b) int **arr[10]
c) int 2arr[10]
d) None
64. Which function in is allow to allocate memory at run time?
a) malloc()
b) alloc ()
c) calloc()
www.samyama.co.in By Kishor B. Parkhe. Page 7
8. C PROGRAMING ATPITUDE TEST
d) Both b & c
65. The memory allocated by a malloc , realloc and calloc functions are
a) Destroyed automatically
b) Not destroyed
c) Destroyed by free() function.
d) None
66. The argument which pass by a commands is called
a) Argcomd
b) Command line argument
c) Both a and b
d) None
67. Which function is used to convert string value into a integer value?
a) malloc()
b) calloc()
c) atoi()
d) Both a and b
68. Structure is collection of
a) Different data type
b) Only same data type
c) Only integer type
d) None
69. The data items of structure is called
a) Member
b) Field
c) Variable
d) Both a and b
70. Which operator is used to access structure variable?
a) *
b) . (dot)
c) ->
d) None
71. Declaration of structure inside is a
a) Legal
b) Illegal
c) Give error at run time only
d) None
www.samyama.co.in By Kishor B. Parkhe. Page 8