Constants and Variables

1. A process of translation of program text into object or assembly text is known as :

  • Code Generation
  • Constant
  • Code
  • None of these
View Answer
Code Generation

2. Which data items never change their value during a program run?

  • Keyword
  • Operator
  •  Literal
  • None of these
View Answer
 Literal

3. Every executable statement in C ++ must be terminated by a –

  •  :
  •  ;
  •  ,
  •  >>
View Answer
 ; 

4. In CD Symbol is used to :

  • Comment
  • Execute
  • Compile
  •  None of these
View Answer
Comment 

5. Which error occurs during the execution of a program?

  •  Execution error
  • Run-time error
  •  Both a and b
  • Logical error
View Answer
 Both a and b 

6. Tokens that trigger some computation when applied to variables and other objects in an expression is known as :

  • Operator
  •  Identifier
  •  Punctuator
  •  None of these
View Answer
Operator

7. A word having special meaning reserved by a programming language is a :

  • Keyword
  • Literals
  • Identifier
  • None of these
View Answer
Keyword

8. The extension of CH is :

  •  C ++
  •  CPP
  •  CP
  • C
View Answer
 CPP 

9. How many ways to insert comments in C # programming?

  •  4
  •  3
  •  2
  •  1
View Answer
 2

10. In C ++ programming execution of the program start and end at :

  •  chscr
  •  getch
  •  main
  • None of these
View Answer
 main

11. All header files and with-

  •  n
  •  h
  •   .
  •  None of these
View Answer
 h

12. When statements are not meaningful than which error is occurring?

  • Semantics error
  •  Syntax error
  • Type error
  • None of these
View Answer
Semantics error 

13. Cout << is used to :

  •  Execute
  •  Result
  • Print
  •  None of these
View Answer
Print 

14. A sequence of bytes is called a :

  • Ostream
  • istream
  •  Stream
  •  None of these
View Answer
 Stream 

15. The smallest individual unit in a program is :

  • Appendix
  • Token
  • Both a and b
  • None of these
View Answer
Token

16. Which symbol is used for pointer declaration?

  • !
  • *
  •  –
  • #
View Answer

17. Those characters that cannot be typed directly from a keyboard is –

  •  Graphic Sequence
  •  Non – graphic Sequence
  • Nongraphic character
  • Graphic character
View Answer
Nongraphic character

18. C ++ allows how many types of integer constants?

  • 5
  • 4
  • 3
  •  2
View Answer
3

19. Bitwise complement is a :

  • Binary operator
  •  Arithmetic operator
  • Unary operator
  • None of these
View Answer
Unary operator

20. Another name of the token is :

  •  lexical element
  •  lexical unit
  • both a and b
  • None of these
View Answer
both a and b

21. Floating constant is also known as :

  • Real constant 
  •  Exponent constant
  • Fractional constant
  • All of these
View Answer
Real constant 

22. A character constant in C ++ must contain :

  • Must be enclosed in single quotation marks
  • One character
  •  Both a and b
  •  None of the above
View Answer
One character 

23. A sequence of digits starting with 0 ( zero ) is taken to be an :

  • Hexadecimal Integer
  • Decimal Integer
  • Octal Integer
  • None of these
View Answer
Octal Integer 

24. Underscore ( – ) counts as a :

  • Letter
  •  Symbol
  • Both a and b
  • None of these
View Answer
Letter 

25. Symbol of Ellipsis is :

  • !
  • ~
  • None of these
View Answer
… 

26. ….. …….. are data items that never change their values during a program run :

  • Punctuation
  •  Operator
  • Literals
  •  None of these
View Answer
Literals 

27. How many character constants are treated as-

  • Double character
  • Multi character
  • Single character
  •  None of these
View Answer
Multi character 

28. Symbol of block comment is :

  • * /
  • .
  •  //
  •  None of these
View Answer
* /

Leave a Comment