Computer Science :: All Aptitude Test ::

1.Simple routines that programmers use as place holders while a system is being tested are called __?
A. stubs
B. stumps
C. holders
D. stubs

2.You can place function templates
A. at the end of main()
B. at the start of a program above main()
C. in two files-one for the definition and one for the function
D. at the end of main()

3.The two operators && an || are
A. arithmetic operators
B. equality operators
C. logical operators
D. arithmetic operators

4.The arguments that determine the state of the cout object are called _____
A. classes
B. manipulators
C. format flags
D. classes

5.Static variables are sometimes called
A. class variables
B. functional variables
C. dynamic variables
D. class variables

6.An expression
A. is a collection of data objects and operators that can be evaluated to a single value
B. is a name that substitutes for a sequence of characters
C. causes the computer to carry out some action
D. is a collection of data objects and operators that can be evaluated to a single value

7.In the C language, the character type of constant is delimited by using
A. single quotes
B. double quotes
C. parenthesis
D. single quotes

8.One way in which a structure differs from an array is that _____
A. a structure may have members of more than one type
B. a structure must have members that; are all the same type
C. art array may have members of more than one type
D. a structure may have members of more than one type

9.A default constructor _____
A. takes no arguments
B. has default values for all its arguments
C. either (a) or (b)
D. takes no arguments

10.The number 125.35 is a _____
A. character literal constant
B. numeric literal constant
C. string literal constant
D. character literal constant

11.When a class serves as a base class to others, _____
A. all of its members are inherited
B. all of its members are inherited, except for any private members
C. all of its members are inherited, except for any protected members
D. all of its members are inherited

12.Storing a class definition in a separate file is an example of
A. polymorphism
B. name mangling
C. implementation hiding
D. polymorphism

13.Which is true?
A. Sequential cohesion is slightly weaker than functional cohesion
B. Sequential cohesion is slightly stronger than functional cohesion
C. Sequential cohesion is much stronger than functional cohesion
D. Sequential cohesion is slightly weaker than functional cohesion

14.A class named student must have a constructor whose name is
A. student
B. ~student
C. constructor
D. student

15.The statement double val[15]={44.123456};
A. assigns the value 44.123456 to all members of the array val
B. assigns the value 44.123456 to val[0] and 0 to the rest of the members
C. gives an error message
D. assigns the value 44.123456 to all members of the array val

16.Which of the following C++ expressions will find the square root of the number 16?
A. pow (16, 2) (b) root (16, 2)
B. sqroot (16)
C. sqrt (16, 2)
D. pow (16, 2) (b) root (16, 2)

17.It is illegal to make objects of one class members of another class
A. TRUE
B. FALSE
C. depends upon the kind of object
D. TRUE

18.Catch blocks must _____
A. appear in every object-oriented program
B. appear within try blocks
C. appear immediately after throw statements
D. appear in every object-oriented program

19.An exception specification begins with the keyword _____
A. exception
B. try
C. throw
D. exception

20.You construct a class in two sections, known as the _____
A. header and body
B. type and parameters
C. declaration and implementation
D. header and body

21.The statement i*=3 is equivalent to
A. i = 3*
B. i = 3
C. i* = 3
D. i = 3*

22.The complement operator is represented by the symbol
A. ~
B. ^
C. i
D. ~

23.One of the relational operators in the C language is
A. !=
B. &&
C. !
D. !=

24.Within a program, you can instantiate ________that have a class template type
A. classes
B. functions
C. parameters
D. classes

25.The rules to any programming language are its ___
A. syntax
B. interpretation
C. logic
D. syntax

26.Which of the following backslash codes used for bell?
A. 
B. a
C.
D. 

27.The last statement in a value-returning function is always __
A. };
B. result expression;
C. return;
D. };

28.One of the logical operators in the C language is represented by the symbol
A. AND
B. &&
C. >=
D. AND

29.Which of the following tells C++ to display numbers in fixed notation?
A. setiosflags(fixed)
B. setiosflags(fixed: :is)
C. setiosflags(ios, fixed)
D. setiosflags(fixed)

30.The #include instruction is called a
A. direction
B. directive
C. merge instruction
D. direction


Date to Date Current Affairs 2022

PakMCQs.net

Quick Links

GAT Subject



   Computer Science    English Mcqs    Agriculture    

Engineering



   Computer Science    Civil Engineering    

Technical



   Networking    Electronics    Database    

Past Papers



   Model Papers    FPSC Papers