Explore topic-wise MCQs in Grapecity.

This section includes 15 Mcqs, each offering curated multiple-choice questions to sharpen your Grapecity knowledge and support exam preparation. Choose a topic below to get started.

1.

What is the simplest method of computing the sum of all the elements of an array?

A. array_intersect()
B. array_count()
C. array_sum()
D. array_value_count()
Answer» D. array_value_count()
2.

How many type of Primitive Data Types exist in Java?

A. 5
B. 7
C. 8
D. 10
Answer» D. 10
3.

Local Variables can be access ?

A. Code block enclosed in braces { }.
B. Code block enclosed in bracket ().
C. Code block enclosed in square bracket [].
D. None of the above
Answer» B. Code block enclosed in bracket ().
4.

What features make C++ so powerful?

A. Easy implementation
B. Code reusability
C. Easy memory management
D. All the above
Answer» E.
5.

The goal of operator overloading is __________.

A. To help the user of a class
B. To help the developer of a class
C. To help define friend function
D. None of the above
Answer» B. To help the developer of a class
6.

Member of a class specified as _______ are accessible only to method of the class.

A. private
B. public
C. protected
D. derive
Answer» B. public
7.

A __________ is a special method used to initialize the instance variable of a class.

A. Member function
B. Destructor
C. Destructor Constructor
D. Structure
Answer» D. Structure
8.

Which of the following is user defined data type?

A. Public
B. Private
C. Class
D. A & B Both
Answer» D. A & B Both
9.

The static member variable is initialized to?

A. 0
B. 1
C. 2
D. -1
Answer» B. 1
10.

Inserting a node after a given node in doubly linked list requires -

A. one pointer changes
B. two pointer changes
C. three pointer changes
D. four pointer changes
Answer» E.
11.

Follow the code snippet and chose the correct statement(s) int x; void f2() { int x = 1 ; // line 1 :: x = 2; // line 2 x = 2; // line 3 }

A. The statement in line 1 throws a compilation error
B. In line 2 , x=2 is assigned to the global x
C. In line 3, x=2 is assigned to the global x and line 2 throws compilation error
D. Both A and B
Answer» C. In line 3, x=2 is assigned to the global x and line 2 throws compilation error
12.

When we concatenate two strings s1 and s2 of size m and n, size of the resultant string is always -

A. of size m + n
B. of size less than m + n
C. of size m * n
D. of size max(m, n)
Answer» B. of size less than m + n
13.

The memory allocated during COMPILE time is

A. Dynamic
B. Static
C. Automatic
D. Hybrid
Answer» C. Automatic
14.

Which of the following data structures are used in RDBMS?

A. Graph
B. Array of structures
C. Trees
D. None of these
Answer» C. Trees
15.

In 8086, overflow flag is set when___________________

A. The sum is more than 16 bits
B. Signed numbers go out of their range after an arithmetic operation
C. Carry and sign flags are set
D. During subtraction
Answer» C. Carry and sign flags are set