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.

31. Match the following with respect to the jump statements 

List-I                           List-II

a. return                   i.  The conditional test and increment portions

b. goto                     ii.  A value associated with it

c. break                  iii. Requires a label for

d. continue             iv. An exit from only the innermost

Codes:

a       b      c      d
a. ii       iii      iv      i
b. iii       iv      i      ii
c. iv       iii      ii      i
d. iv       iii      i      ii
View Answer Report Discuss Too Difficult! Search Google
Answer: (a).ii       iii      iv      i

32. The control string in C++ consists of three important classifications of characters
a. Escape sequence characters, Format specifiers and White-space characters
b. Special characters, White-space characters and Non-white space characters
c. Format specifiers, White-space characters and Non-white space characters
d. Special characters. White-space characters and Format specifiers
View Answer Report Discuss Too Difficult! Search Google
Answer: (c).Format specifiers, White-space characters and Non-white space characters

33. Match the following with respect to the jump statements 

List-I                           List-II

a. fopen()                       i.  returns end of file

b. fclose()                      ii.  return for any problem report

c. ferror()                       iii. returns 0

d. feof()                          iv. returns a file pointer

Codes:

a       b       c       d
a. iv       i       ii       iii
b. iii       i       iv       ii
c. ii       iii       iv       i
d. iv     iii       i       ii
View Answer Report Discuss Too Difficult! Search Google
Answer: (a).iv       i       ii       iii

34. Given i=0, j=1,k=-1 x=0.5, y=0.0
What is the output of the following expression in C language.
x*y
a. -1
b. 0
c. 1
d. 2
View Answer Report Discuss Too Difficult! Search Google
Answer: (c).1

35. The following statement in 'C'

int (*f())[];

declares
a. a function returning a pointer to an array of integers
b. a function returning an array of pointers to integers
c. array of functions returning pointer to integers
d. an illegal statement
View Answer Report Discuss Too Difficult! Search Google
Answer: (a).a function returning a pointer to an array of integers

36. Which one of the following is correct, when a class grants friend status to another class?
a. The member functions of the class generating friendship can access the members of the friend class
b. All member functions of the class granted friendship have unrestricted access to the members of the class granting the friendship
c. Class friendship is reciprocal to each other
d. There is no such concept
View Answer Report Discuss Too Difficult! Search Google
Answer: (b).All member functions of the class granted friendship have unrestricted access to the members of the class granting the friendship

37. What is the value returned by the function f given below when n=100 ?
int f (int n)
{ if (n==0) then return n;
else
return n + f(n-2);
}
a. 2550
b. 2556
c. 5220
d. 5520
View Answer Report Discuss Too Difficult! Search Google
Answer: (a).2550

38. Which of the following cannot be passed to a function in C++?
a. Constant
b. Structure
c. Array
d. Header file
View Answer Report Discuss Too Difficult! Search Google
Answer: (d).Header file

39. Which one of the following is correct for overloaded functions in C++?
a. Compiler sets up a separate function for every definition of function
b. Compiler does not set up a separate function for every definition of function
c. Overloaded functions cannot handle different types of objects
d. Overloaded functions cannot have same number of arguments
View Answer Report Discuss Too Difficult! Search Google
Answer: (a).Compiler sets up a separate function for every definition of function

40. Which of the following storage classes have global visibility in C/C++?
a. Auto
b. Extern
c. Static
d. Register
View Answer Report Discuss Too Difficult! Search Google
Answer: (b).Extern

Page 4 of 16