NIOS Class 12 Computer Science Chapter 12 Introduction To C++

NIOS Class 12 Computer Science Chapter 12 Introduction To C++ Solutions English Medium As Per New Syllabus. to each chapter is provided in the list so that you can easily browse throughout different chapters NIOS Class 12 Computer Science Chapter 12 Introduction To C++ Notes and select need one. NIOS Class 12 Computer Science Question Answers Download PDF. NIOS Study Material of Class 12 Computer Science Notes Paper 330.

NIOS Class 12 Computer Science Chapter 12 Introduction To C++

Also, you can read the NIOS book online in these sections Solutions by Expert Teachers as per National Institute of Open Schooling (NIOS) Book guidelines. These solutions are part of NIOS All Subject Solutions. Here we have given NIOS Class 12 Computer Science Textbook Solutions, NIOS Senior Secondary Course Computer Science Notes for All Chapter, You can practice these here.

Chapter: 12

Module – 3: Programming in C++

INTEXT QUESTIONS 12.1 

1. Fill in the blanks. 

(a) A keyword is a _________________ word of C++. 

Ans: Reserved.

(b) Pascal is a  ______________ language whereas C++ is an ________________ language .

Ans: Structured, object-oriented.

(c) An identifier must not start with a _________________ .

Ans: Digit.

(d) _________________ constants are whole numbers without any fractional part. 

Ans: Integer.

(e) A sequence of characters enclosed within double quotes is called a ________________ literal. 

Ans: String.

2. State whether the following statements are true or false: 

(a) An identifier name can start with the underscore ‘–’. 

Ans: True.

(b) A token is a group of characters that logically belong together. 

Ans: True.

(c) Literals are data items that generally change their value during program execution. 

Ans: False.

(d) An escape sequence represents a single character. 

Ans: True.

(e) The symbol # is used as pre-processor directive. 

Ans: True.

3. List out the various types of tokens used in C++. 

Ans: Various types of tokens used in C++ are:

(i) Keywords.

(ii) Identifiers.

(iii) Literals.

(iv) Punctuators.

(v) Operators.

4. List out the data types supported by C++.

Ans: Data types supported by C++ are:

(i) Integer type (int).

(ii) Floating point type (float).

(iii) Character type (char).

(iv) Double precision type (double).

(v) Void type (void).

INTEXT QUESTIONS 12.2 

1. Fill in the blanks: 

(a) _______________ operators are used to test the relation between two values. 

Ans: Relational.

(b) C++ provides two _______________ operators for which only one variable is required. 

Ans: Unary.

(c) The process in which one pre-defined type of expression is converted into another type is called _______________ .

Ans: Conversion.

(d) A _______________ does not understand the contents of a comment and ignores it. 

Ans: Compiler.

(e) The operator ++ is known as _______________ operator. 

Ans: Increment.

2. State whether the following statements are true or false: 

(a) The computer value of an arithmetic expression is always a numerical value. 

Ans: True.

(b) ‘\n’ is the remainder operator. 

Ans: False.

(c) Arithmetic operations on characters is allowed in C++. 

Ans: True.

(d) The output of logical AND operation is true if one of its operand is true. 

Ans: False.

(e) + = is a compound assignment operator. 

Ans: True.

3. Evaluate the following expressions. 

(a) 5/3 * 6

Ans: 6. 

(b) 6.0 * 5/3 

Ans: 10.0.

(c) 6 * 5/3

Ans: 10.

TERMINAL EXERCISE 

1. What is the difference between a keyword and an identifier? 

Ans: 

KeywordIdentifier
A keyword is a reserved word with a predefined meaning in a programming language.An identifier is a user-defined name used to identify variables, functions, or other items.
Keywords cannot be used as names.Identifiers are used to name program elements.
Examples: if, while, intExamples: sum, total, count

2. Explain the following terms: 

(i) Literals. 

Ans: Literals (often referred to as constants) are data items that never change their value during the execution of the program. The following types of literals are available in C++. 

(i) integer-constants. 

(ii) character-constants. 

(iii) floating-constants.  

(iv) string-literals.  

(ii) Implicit conversion.

Ans: Implicit conversion is the automatic conversion of one data type into another by the compiler without any instruction from the programmer. It generally occurs when a value of a smaller data type is assigned to a larger data type, so no data is lost.

3. How many ways are there in C++ to represent an integer constant? 

Ans: There are Three types of C++ to represent an integer constant:

(i) Decimal (Base 10).

(ii) Octal (Base 8). 

(iii) Hexadecimal (Base 16).

NEW VIDEO CLASS

Subject Ka Complete Video Solution Dekhein

Step-by-step easy concept explanation aur full questions Answer ke liye watch karein ya app download karein:

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to Top