Logo

C-and-c- Questions Set 2:

Quiz Mode

Which of following is not a type of pointer in C++.

1
2
3
4

Solution:

Memory used by an array is

1
2
3
4

Solution:

 

Which of the following keyword is used to overload an operator?

1
2
3
4

Solution:

What is the output of the following code?


 

int main()

{

printf("%c ", 3["Abekus"]);

return 0;

}

1
2
3
4

Solution:

In which context does a stack operate?

1
2
3
4

Solution:

Which type of data type conversion is not accepted in C?

1
2
3
4

Solution:

Dividing a program into functions:

1. Is the key to object-oriented programming.

2. Makes the program easier to conceptualize.

3. May reduce the size of the program.

4. Makes the program run faster.

1
2
3
4

Solution:

What happens when a function is declared with a void parameter?

1
2
3
4

Solution:

How do lists differ from vectors?

1
2
3
4

Solution:

Parul takes as input two numbers: a and b. a and b can take integer values between 0 and 255. She stores a, b and c as a 1-byte data type. She writes the following code statement to process a and b and put the result in c.

c=a+2*b To her surprise her program gives the right output with some input values of a and b, while gives an erroneous answer for others. For which of the following inputs will it give a wrong answer?

1
2
3
4

Solution: