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
Answer
Code Generation

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

  • Keyword
  • Operator
  • ¬†Literal
  • None of these
Answer
 Literal

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

  • ¬†:
  • ¬†;
  • ¬†,
  • ¬†>>
Answer
 ; 

4. In CD Symbol is used to :

  • Comment
  • Execute
  • Compile
  • ¬†None of these
Answer
Comment 

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

  • ¬†Execution error
  • Run-time error
  • ¬†Both a and b
  • Logical error
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
Answer
Operator

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

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

8. The extension of CH is :

  • ¬†C ++
  • ¬†CPP
  • ¬†CP
  • C
Answer
 CPP 

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

  • ¬†4
  • ¬†3
  • ¬†2
  • ¬†1
Answer
 2

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

  • ¬†chscr
  • ¬†getch
  • ¬†main
  • None of these
Answer
 main

11. All header files and with-

  • ¬†n
  • ¬†h
  • ¬† .
  • ¬†None of these
Answer
 h

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

  • Semantics error
  • ¬†Syntax error
  • Type error
  • None of these
Answer
Semantics error 

13. Cout << is used to :

  • ¬†Execute
  • ¬†Result
  • Print
  • ¬†None of these
Answer
Print 

14. A sequence of bytes is called a :

  • Ostream
  • istream
  • ¬†Stream
  • ¬†None of these
Answer
 Stream 

15. The smallest individual unit in a program is :

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

16. Which symbol is used for pointer declaration?

  • !
  • *
  • ¬†–
  • #
Answer
* 

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

  • ¬†Graphic Sequence
  • ¬†Non – graphic Sequence
  • Nongraphic character
  • Graphic character
Answer
Nongraphic character

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

  • 5
  • 4
  • 3
  • ¬†2
Answer
3

19. Bitwise complement is a :

  • Binary operator
  • ¬†Arithmetic operator
  • Unary operator
  • None of these
Answer
Unary operator

20. Another name of the token is :

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

21. Floating constant is also known as :

  • Real constant¬†
  • ¬†Exponent constant
  • Fractional constant
  • All of these
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
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
Answer
Octal Integer 

24. Underscore ( – ) counts as a :

  • Letter
  • ¬†Symbol
  • Both a and b
  • None of these
Answer
Letter 

25. Symbol of Ellipsis is :

  • !
  • ~
  • None of these
Answer
…¬†

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

  • Punctuation
  • ¬†Operator
  • Literals
  • ¬†None of these
Answer
Literals 

27. How many character constants are treated as-

  • Double character
  • Multi character
  • Single character
  • ¬†None of these
Answer
Multi character 

28. Symbol of block comment is :

  • * /
  • .
  • ¬†//
  • ¬†None of these
Answer
* /

Leave a Comment