Call
whatsapp
9447387064 | 9847003556
0471-2335855 | 8089080088 | 0471-2334855
9447387064 | 9847003556
0471-2335855 | 8089080088 | 0471-2334855
Cisco Training in Trivandrum, Trinity Technologies

No.1 Training Institute in Kerala

C++ - QUESTIONS : PART 1

Which data type is used to represent the absence of parameters?

int

short

void

float

SHOW ANSWER

Which type is best suited to represent the logical values?

integer

boolean

character

SHOW ANSWER

Identify the user-defined types from the following?

enumeration

classes

both enumeration and classes

int

SHOW ANSWER

Which of the following statements are true?

int f(float)

f is a function taking an argument of type int and returning a floating point number

f is a function taking an argument of type float and returning an integer

f is a function of type float

SHOW ANSWER

The value 132.54 can be represented using which data type?

double

void

int

bool

SHOW ANSWER

Pick the odd one out.

integer, character, boolean, floating

enumeration, classes

integer, enum, void

arrays, pointer, classes

SHOW ANSWER

What does the following statement mean?

int (*fp)(char*)

pointer to a pointer

pointer to an array of chars

pointer to function taking a char* argument and returns an int

function taking a char* argument and returning a pointer to int

SHOW ANSWER

The operator used for dereferencing or indirection is ____

*

&

->

->>

SHOW ANSWER

Choose the right option
    string* x, y;

x is a pointer to a string, y is a string

y is a pointer to a string, x is a string

both x and y are pointers to string types

SHOW ANSWER

Which one of the following is not a possible state for a pointer

hold the address of the specific object

point one past the end of an object

zero

point to a type

SHOW ANSWER

What will happen in this code?

  1.    int a = 100, b = 200;
  2.    int *p = &a, *q = &b;
  3.    p = q;

b is assigned to a

p now points to b

a is assigned to b

q now points to a

SHOW ANSWER

Which of the following correctly declares an array?

int array[10];

int array;

array{10};

array array[10];

SHOW ANSWER

What is the index number of the last element of an array with 9 elements?

9

8

0

programmer defined

SHOW ANSWER

What is a array?

An array is a series of elements of the same type in contiguous memory locations

An array is a series of element

An array is a series of elements of the same type placed in non-contiguous memory locations

SHOW ANSWER

Which of the following accesses the seventh element stored in array?

array[6];

array(6}

array[7];

SHOW ANSWER

Which of the following gives the memory address of the first element in array?

array[0];

array[1];

array(2);

array;

SHOW ANSWER

Where does the object is created?

class

constructor

destructor

attributes

SHOW ANSWER

How to access the object in the class?

scope resolution operator

ternary operator

direct member access operator

SHOW ANSWER

Which of these following members are not accessed by using direct member access operator?

public

private

protected

SHOW ANSWER
BACK | NEXT
TRINITY SOFTWARE SOLUTIONS,IInd floor, Radheyam Towers, Gandhari Amman Kovil Road, Pulimood, Trivandrum - 1
0471-2334855 | 2335855 | 9447387064 | 9847003556 info@trinitytechnology.in