Question 1
Which of the following is the scope resolution operator?
.
*
::
~
Question 2
Which of the following symbol is used to declare the preprocessor directives in C++?
$
^
*
#
Question 3
How many base manipulators are available in c++?
4
3
2
1
Question 4
How many types of output stream classes are there in c++?
1
2
3
4
Question 5
What will be the output of the following C++ code?
#include <iostream>
using namespace std;
int main()
{
char c = 74;
cout << c;
return 0;
}
I
A
J
N
Question 6
What will be the output of the following C++ code?
#include<iostream>
using namespace std;
int main () {
int cin;
cin >> cin;
cout << "cin: " << cin;
return 0;
}
Compilation error
cin: 0
cin: (garbage value)
Nothing is printed
Question 7
What is meant by ofstream in c++?
Writes to a file
Reads from a file
Writes to a file & Reads from a file
delete a file
Question 8
What can be used to input a string with blank space?
inline
getline
putline
setline
Question 9
Which of the following escape sequences represents carriage return?
\r
\n
\n\r
\c
Question 10
What will be the output of the following C++ code?
#include<iostream>
using namespace std;
int x[67];
int main()
{
cout << x[62] << endl;
}
Garbage value
67
62
0
There are 10 questions to complete.