Quiz-1

Hello PrepSter,

If you find any errors in the quiz below kindly comment in the comment section and we will make it our priority to fix it.

Also if you have a better of the solution to the questions, please do comment them below and if we find it better than ours, we will post it in our website.

Question 1

Time: 00:00:00
Which variable does equals in size with enum variable?

int variable

int variable

float variable

float variable

string variable

string variable

none of the mentioned

none of the mentioned

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Question 2

Time: 00:00:00
What is the output of this program?









  1.     #include <iostream>



  2.     using namespace std;



  3.     enum test



  4.     {



  5.         A = 32, B, C



  6.     };



  7.     int main()



  8.     {



  9.         cout << A << B<< C;



  10.         return 0;



  11.     }









323334

323334

323232

323232

323130

323130

None of these

None of these

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Question 3

Time: 00:00:00
. What is the output of this program?









  1.     #include <iostream>



  2.     using namespace std;



  3.     enum colour {



  4.         green, red, blue, white, yellow, pink



  5.     };



  6.     int main()



  7.     {



  8.         cout << green<< red<< blue<< white<< yellow<< pink;



  9.         return 0;



  10.     }









012345

012345

123456

123456

12244

12244

4656

4656

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Question 4

Time: 00:00:00
Identify the incorrect option.

enumerators are constants

enumerators are constants

enumerators are user-defined types

enumerators are user-defined types

enumerators are same as macros

enumerators are same as macros

None of these

None of these

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Question 5

Time: 00:00:00
In which type do the enumerators are stored by the compiler?

String

String

Integer

Integer

Float

Float

None of these

None of these

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Question 6

Time: 00:00:00
Which variable does equals in size with enum variable?

int variable

int variable

float variable

float variable

string variable

string variable

None of these

None of these

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Question 7

Time: 00:00:00
How are the constants declared?

const keyword

const keyword

#define preprocessor

#define preprocessor

both const keyword and #define preprocessor

both const keyword and #define preprocessor

None of these

None of these

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Question 8

Time: 00:00:00
What is the output of this program?









  1.     #include <iostream>



  2.     using namespace std;



  3.     int main()



  4.     {



  5.         int  const  p = 5;



  6.         cout << ++p;



  7.         return 0;



  8.     }









5

5

6

6

Error

Error

None of these

None of these

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Question 9

Time: 00:00:00
Which of the following statement is not true about preprocessor directives?

These are lines read and processed by the preprocessor

These are lines read and processed by the preprocessor

They do not produce any code by themselves

They do not produce any code by themselves

These must be written on their own line

These must be written on their own line

They end with a semicolon

They end with a semicolon

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Question 10

Time: 00:00:00
Regarding the following statement which of the statements is true?
const int a = 100;

Declares a variable a with 100 as its initial value

Declares a variable a with 100 as its initial value

Declares a construction a with 100 as its initial value

Declares a construction a with 100 as its initial value

Declares a constant a whose value will be 100

Declares a constant a whose value will be 100

Constructs an integer type variable with an as identifier and 100 as the value

Constructs an integer type variable with an as identifier and 100 as the value

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

["0","40","60","80","100"]
["Need more practice!","Keep trying!","Not bad!","Good work!","Perfect!"]

Hello PrepSter,

If you find any errors in the quiz below kindly comment in the comment section and we will make it our priority to fix it.

Also if you have a better of the solution to the questions, please do comment them below and if we find it better than ours, we will post it in our website.

Question 1

Time: 00:00:00
Which variable does equals in size with enum variable?

int variable

int variable

float variable

float variable

string variable

string variable

none of the mentioned

none of the mentioned

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Question 2

Time: 00:00:00
What is the output of this program?









  1.     #include <iostream>



  2.     using namespace std;



  3.     enum test



  4.     {



  5.         A = 32, B, C



  6.     };



  7.     int main()



  8.     {



  9.         cout << A << B<< C;



  10.         return 0;



  11.     }









323334

323334

323232

323232

323130

323130

None of these

None of these

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Question 3

Time: 00:00:00
. What is the output of this program?









  1.     #include <iostream>



  2.     using namespace std;



  3.     enum colour {



  4.         green, red, blue, white, yellow, pink



  5.     };



  6.     int main()



  7.     {



  8.         cout << green<< red<< blue<< white<< yellow<< pink;



  9.         return 0;



  10.     }









012345

012345

123456

123456

12244

12244

4656

4656

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Question 4

Time: 00:00:00
Identify the incorrect option.

enumerators are constants

enumerators are constants

enumerators are user-defined types

enumerators are user-defined types

enumerators are same as macros

enumerators are same as macros

None of these

None of these

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Question 5

Time: 00:00:00
In which type do the enumerators are stored by the compiler?

String

String

Integer

Integer

Float

Float

None of these

None of these

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Question 6

Time: 00:00:00
Which variable does equals in size with enum variable?

int variable

int variable

float variable

float variable

string variable

string variable

None of these

None of these

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Question 7

Time: 00:00:00
How are the constants declared?

const keyword

const keyword

#define preprocessor

#define preprocessor

both const keyword and #define preprocessor

both const keyword and #define preprocessor

None of these

None of these

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Question 8

Time: 00:00:00
What is the output of this program?









  1.     #include <iostream>



  2.     using namespace std;



  3.     int main()



  4.     {



  5.         int  const  p = 5;



  6.         cout << ++p;



  7.         return 0;



  8.     }









5

5

6

6

Error

Error

None of these

None of these

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Question 9

Time: 00:00:00
Which of the following statement is not true about preprocessor directives?

These are lines read and processed by the preprocessor

These are lines read and processed by the preprocessor

They do not produce any code by themselves

They do not produce any code by themselves

These must be written on their own line

These must be written on their own line

They end with a semicolon

They end with a semicolon

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Question 10

Time: 00:00:00
Regarding the following statement which of the statements is true?
const int a = 100;

Declares a variable a with 100 as its initial value

Declares a variable a with 100 as its initial value

Declares a construction a with 100 as its initial value

Declares a construction a with 100 as its initial value

Declares a constant a whose value will be 100

Declares a constant a whose value will be 100

Constructs an integer type variable with an as identifier and 100 as the value

Constructs an integer type variable with an as identifier and 100 as the value

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

["0","40","60","80","100"]
["Need more practice!","Keep trying!","Not bad!","Good work!","Perfect!"]

Hey ! Follow us on G+