A directory of Objective Type Questions covering all the Computer Science subjects. Here you can access and discuss Multiple choice questions and answers for various compitative exams and interviews.

101. In case of right shift bitwise operator in ‘C’ language, after shifting n bits, the left most n bits:
a. are always filled with zeroes
b. are always filled with ones
c. are filled with zeroes or ones and is machine dependent
d. none of the above
View Answer Report Discuss Too Difficult! Search Google
Answer: (c).are filled with zeroes or ones and is machine dependent

102. What keyword in class specification helps to hide data:
a. Public
b. Private
c. Static
d. Void
View Answer Report Discuss Too Difficult! Search Google
Answer: (b).Private

103. What is the output of the following ‘C’ program?

main()
{printf(“%x”,-1>>4);}
a. ffff
b. 0fff
c. 0000
d. fff0
View Answer Report Discuss Too Difficult!
Answer: (a).ffff

104. Runtime polymorphism can be achieved by:
a. Accessing virtual function through the pointer of the base class
b. Accessing virtual function through the object
c. The derived class
d. None of these
View Answer Report Discuss Too Difficult! Search Google
Answer: (a).Accessing virtual function through the pointer of the base class

105. When a function is recursively called, all automatic variables:
a. are initialized during each execution of the function
b. are retained from the last execution
c. are maintained in a stack
d. are ignored
View Answer Report Discuss Too Difficult! Search Google
Answer: (a).are initialized during each execution of the function

106. Enumeration variables can be used in:
a. search statement like an integer variable
b. break statement
c. preprocessor commands
d. function statement
View Answer Report Discuss Too Difficult! Search Google
Answer: (a).search statement like an integer variable

107. int arr[ ] = {1, 2, 3, 4}
int count;
incr( ) {return ++count;}
main( )
{
arr[count++]=incr( );
printf(“arr[count]=%d\n”, arr[count]);
}

The value printed by the above program is:
a. 1
b. 2
c. 3
d. 4
View Answer Report Discuss Too Difficult! Search Google
Answer: (b).2

108. When one-dimensional character array of unspecified length is assigned an initial value:
a. an arbitrary character is automatically added to the end of the string
b. ‘o’ is added to the end of the string
c. length of the string is added to the end of the string
d. ‘end’ is added to the end of the string
View Answer Report Discuss Too Difficult! Search Google
Answer: (b).‘o’ is added to the end of the string

109. The declaration “unsigned u” indicates:
a. u is an unsigned character
b. u is an unsigned integer
c. u is a character
d. u is a string
View Answer Report Discuss Too Difficult! Search Google
Answer: (b).u is an unsigned integer

110. What is the output of the following program segment ?

main()
{
int count, digit=0;
count=1;
while(digit<=9){
printf(“%d\n”,++count); ++digit;}
}
a. 10
b. 9
c. 12
d. 11
View Answer Report Discuss Too Difficult! Search Google
Answer: (d).11