{"id":33414,"date":"2021-02-08T06:06:09","date_gmt":"2021-02-08T06:06:09","guid":{"rendered":"https:\/\/tnboardsolutions.com\/?p=33414"},"modified":"2021-07-08T01:54:56","modified_gmt":"2021-07-08T07:24:56","slug":"samacheer-kalvi-11th-computer-science-guide-chapter-9","status":"publish","type":"post","link":"https:\/\/tnboardsolutions.com\/samacheer-kalvi-11th-computer-science-guide-chapter-9\/","title":{"rendered":"Samacheer Kalvi 11th Computer Science Guide Chapter 9 Introduction to C++"},"content":{"rendered":"

Tamilnadu State Board New Syllabus Samacheer Kalvi 11th Computer Science Guide<\/a> Pdf Chapter 9 Introduction to C++ Text Book Back Questions and Answers, Notes.<\/p>\n

Tamilnadu Samacheer Kalvi 11th Computer Science Solutions Chapter 9 Introduction to C++<\/h2>\n

11th Computer Science Guide Introduction to C++ Text Book Questions and Answers<\/h3>\n

Book Evaluation
\nPart I<\/span><\/p>\n

Choose The Correct Answer<\/span><\/p>\n

Question 1.
\nWho developed C++?
\na) Charles Babbage
\nb) Bjarne Stroustrup
\nc) Bill Gates
\nd) Sundar Pichai
\nAnswer:
\nb) Bjarne Stroustrup<\/p>\n

Question 2.
\nWhat was the original name given to C++?
\na) CPP
\nb) Advanced C
\nc) C with Classes
\nd) Class with C
\nAnswer:
\nc) C with Classes<\/p>\n

\"Samacheer<\/p>\n

Question 3.
\nWho coined C++?
\na) Rick Mascitti
\nb) Rick Bjarne
\nc) Bill Gates
\nd) Dennis Ritchie
\nAnswer:
\na) Rick Mascitti<\/p>\n

Question 4.
\nThe smallest individual unit in a program is:
\na) Program
\nb) Algorithm
\nc) Flowchart
\nd) Tokens
\nAnswer:
\nd) Tokens<\/p>\n

Question 5.
\nWhich of the following operator is extraction operator of C++?
\na) >>
\nb) <<
\nc) <>
\nd) AA
\nAnswer:
\na) >><\/p>\n

\"Samacheer<\/p>\n

Question 6.
\nWhich of the following statements is not true?
\na) Keywords are the reserved words convey specific meaning to the C++ compiler.
\nb) Reserved words or keywords can be used as an identifier name.
\nc) An integer constant must have at least one digit without a decimal point.
\nd) Exponent form of real constants consists of two parts
\nAnswer:
\nb) Reserved words or keywords can be used as an identifier name.<\/p>\n

Question 7.
\nWhich of the following is a valid string literal?
\na) ‘A’
\nb) ‘Welcome’
\nc) 1232
\nd) “1232”
\nAnswer:
\nd) “1232”<\/p>\n

Question 8.
\nA program written in high level language is called as ………………………
\na) Object code
\nb) Source code
\ne) Executable code
\nd) All the above
\ne) Executable code
\nAnswer:
\nb) Source code<\/p>\n

\"Samacheer<\/p>\n

Question 9.
\nAssume a=5, b=6; what will be result of a & b?
\na) 4
\nb) 5
\nc) 1
\nd) 0
\nAnswer:
\na) 4<\/p>\n

Question 10.
\nWhich of the following is called as compile time operators?
\na) size of
\nb) pointer
\nc) virtual
\nd) this
\nAnswer:
\na) sizeof<\/p>\n

\"Samacheer<\/p>\n

Part – II<\/span><\/p>\n

Very Short Answers<\/span><\/p>\n

Question 1.
\nWhat is meant by a token? Name the token available in C++.
\nAnswer:
\nC++ program statements are constructed by many different small elements such as commands, variables, constants, and many more symbols called operators and punctuators. Individual elements are collectively called Lexical units or Lexical elements or Tokens.
\nC++ has the following tokens:<\/p>\n

    \n
  1. Keywords<\/li>\n
  2. Identifiers<\/li>\n
  3. Literals<\/li>\n
  4. Operators<\/li>\n
  5. Punctuators<\/li>\n<\/ol>\n

    Question 2.
    \nWhat are keywords? Can keywords be used as identifiers?
    \nAnswer:
    \nKeywords:
    \nKeywords are the reserved words which convey specific meaning to the C++ compiler.
    \nThey are the essential elements to construct C++ programs.
    \nExample:
    \nint \/ float \/ auto \/ register Reserved words or keywords cannot be used as an identifier name.<\/p>\n

    \"Samacheer<\/p>\n

    Question 3.
    \nThe following constants are of which type?<\/p>\n

      \n
    1. 39<\/li>\n
    2. 032<\/li>\n
    3. OXCAFE<\/li>\n
    4. 04.14<\/li>\n<\/ol>\n

      Answer:<\/p>\n

        \n
      1. 39 – Decimal<\/li>\n
      2. 032 – Octal<\/li>\n
      3. OXCAFE – Hexadecimal<\/li>\n
      4. 04.14 – Decimal<\/li>\n<\/ol>\n

        Question 4.
        \nWrite the following real constants into the exponent form:
        \ni) 23.197
        \nii) 7.214
        \niii) 0.00005
        \niv) 0.319
        \nAnswer:
        \ni) 23.197 : 0.23197 E2 (OR) 2.3197 E1 (OR) 23197E-3
        \nii) 7.214 : 0.7214 E1 (OR) 72.14 E-1 (OR) 721.4 E-2 (OR) 7214E-3
        \niii) 0.00005 : 5E-5
        \niv) 0.319 : 3.19 E-l (OR) 31.9 E-2 (OR) 319 E-3<\/p>\n

        Question 5.
        \nAssume n=10; what will be result of n>>2;?
        \nAnswer:
        \n\"Samacheer<\/p>\n

        \"Samacheer<\/p>\n

        Question 6.
        \nMatch the following:<\/p>\n\n\n\n\n\n\n\n
        \n

        A<\/p>\n<\/td>\n

        \n

        B<\/p>\n<\/td>\n<\/tr>\n

        (a) Modulus<\/td>\n(1) Tokens<\/td>\n<\/tr>\n
        (b) Separators<\/td>\n(2) Remainder of a division<\/td>\n<\/tr>\n
        (c) Stream extraction<\/td>\n(3) Punctuators<\/td>\n<\/tr>\n
        (d) Lexical Units<\/td>\n(4) get from<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n

        Answer:
        \na) 2
        \nb) 3
        \nc) 4
        \nd) 1<\/p>\n

        Part – III<\/span><\/p>\n

        Short Answers<\/span><\/p>\n

        Question 1.
        \nDescribe the differences between keywords and identifiers.
        \nAnswer:
        \nKeywords:<\/p>\n

          \n
        • Keywords are the reserved words which convey specific meaning to the C++ compiler.<\/li>\n
        • They are essential elements to construct C++ programs.<\/li>\n
        • Most of the keywords are common to C, C++, and Java.<\/li>\n<\/ul>\n

          Identifiers:<\/p>\n

            \n
          • Identifiers are the user-defined names given to different parts of the C++ program.<\/li>\n
          • They are the fundamental building blocks of a program.<\/li>\n
          • Every language has specific rules for naming the identifiers.<\/li>\n<\/ul>\n

            Question 2.
            \nIs C++ case sensitive? What is meant by the term “case sensitive”?
            \nAnswer:
            \nYes. C++ is case sensitive as it treats upper and lower-case characters differently.
            \nExample: NUM, Num, num are different in C++.<\/p>\n

            \"Samacheer<\/p>\n

            Question 3.
            \nDifferentiate “=” and “==”.
            \nAnswer:<\/p>\n

              \n
            • ‘=’ is an assignment operator which is used to assign a value to a variable which is on the left hand side of an assignment statement.<\/li>\n
            • ‘=’operator copies the value at the right side
              \nof the operator to the left side variable. Ex. num = 10; means 10 assign to the variable num.<\/li>\n
            • ‘= =’ is a relational operator. It is used to compare both operands are same or not.<\/li>\n
            • Ex. num = = 10 means it compare num value with 10 and returns true(l) if both are same or returns false(0)<\/li>\n<\/ul>\n

              Question 4.
              \nAssume a=10, b=15; What will be the value of a\u2227b?
              \nAnswer:
              \nBitwise XOR (\u2227) will return 1 (True) if only one of the operand is having a value 1 (True). If both are True or both are False, it will return 0 (False).
              \n\"Samacheer<\/p>\n

              Question 5.
              \nWhat is the difference between “Run time error” and “Syntax error”?
              \nAnswer:
              \nRun time Error:<\/p>\n

                \n
              • A run time error occurs during the execution of a program. It occurs because of some illegal operation that takes place.<\/li>\n
              • For example, if a program tries to open a file which does not exist, it results in a run-time error.<\/li>\n<\/ul>\n

                Syntax Error:<\/p>\n

                  \n
                • Syntax errors occur when grammatical rules of C++ are violated.<\/li>\n
                • For example: if you type as follows, C++ will throw an error.
                  \ncout << \u201cWelcome to Programming in C++\u201d<\/li>\n<\/ul>\n

                  \"Samacheer<\/p>\n

                  Question 6.
                  \nWhat are the differences between “Logical error” and “Syntax error”?
                  \nAnswer:<\/p>\n

                    \n
                  • A Program has not produced the expected result even though the program is grammatically correct. It may be happened by the wrong use of variable\/operator\/order of execution etc. This means, the program is grammatically correct, but it contains some logical error. So, a Semantic error is also called a “Logic Error”.<\/li>\n
                  • Syntax errors occur when grammatical rules of C++ are violated.<\/li>\n<\/ul>\n

                    Question 7.
                    \nWhat is the use of a header file?
                    \nAnswer:
                    \nHeader files contain definitions of Functions and Variables, which are imported or used into any C++ program by using the preprocessor #include statement. Header files have an extension \u201c.h\u201d which contains C++ function declaration and macro definition.
                    \nExample: #include<\/p>\n

                    Question 8.
                    \nWhy is main function special?
                    \nAnswer:
                    \nEvery C++ program must have a main function. The main() function is the starting point where all C++ programs begin their execution. Therefore, the executable statements should be inside the main() function.<\/p>\n

                    Question 9.
                    \nWrite two advantages of using include compiler directive.
                    \nAnswer:<\/p>\n

                      \n
                    1. The program is broken down into modules, thus making it more simplified.<\/li>\n
                    2. More library functions can be used, at the same time size of the program is retained.<\/li>\n<\/ol>\n

                      \"Samacheer<\/p>\n

                      Question 10.
                      \nWrite the following in real constants.<\/p>\n

                        \n
                      1. 15.223<\/li>\n
                      2. 211.05<\/li>\n
                      3. 0.00025<\/li>\n<\/ol>\n

                        Answer:<\/p>\n

                          \n
                        1. 15.223 \u2192 1.5223E1 \u2192 0.15223E2 \u2192 15223E-3<\/li>\n
                        2. 211.05 \u2192 2.1105E2 \u2192 21105 E-2<\/li>\n
                        3. 0.00025 \u2192 2.5E-4<\/li>\n<\/ol>\n

                          Part – IV<\/span><\/p>\n

                          Explain In Detail<\/span><\/p>\n

                          Question 1.
                          \nWrite about Binary operators used in C++.
                          \nAnswer:
                          \nBinary Operators require two operands:
                          \nArithmetic operators that perform simple arithmetic operations like addition, subtraction, multiplication, division (+, -, *, %, \/), etc. are binary operators which require a minimum of two operands.<\/p>\n

                          Relational operators are used to determining the relationship between its operands. The relational operators (<, >, >=, <=, ==, !=) are applied on two operands, hence they are binary operators. AND, OR (logical operator) both are binary operators. The assignment operator is also a binary operator (+=, – =, *=, \/=, %=).<\/p>\n

                          Question 2.
                          \nWhat are the types of Errors?
                          \nAnswer:
                          \nCOMMON TYPES OF ERRORS<\/p>\n\n\n\n\n\n\n\n
                          Type of Error<\/td>\n\n

                          Description<\/p>\n<\/td>\n<\/tr>\n

                          Syntax Error<\/td>\nSyntax is a set of grammatical rules to construct a program. Every programming language has unique rules for constructing the sourcecode.
                          \nSyntax errors occur when grammatical rules of C++ are violated.
                          \nExample: if we type as follows, C++ will throw an error.
                          \ncout << “Welcome to C++”<\/td>\n<\/tr>\n
                          <\/td>\nAs per grammatical rules of C++, every executable statement should terminate with a semicolon. But, this statement does not end with a semicolon.<\/td>\n<\/tr>\n
                          Semantic error’<\/td>\nA Program has not produced expected result even though the program is grammatically correct. It may be happened by the wrong use of variable\/operator\/order of execution etc. This means, the program is grammatically correct, but it contains some logical error. So, Semantic error is also called a “Logic Error”.<\/td>\n<\/tr>\n
                          Run\u00ad time error<\/td>\n\u00a0A run time error occurs during the execution of a program. It occurs because of some illegal operation that takes place.
                          \nFor example, if a program tries to open a file which does not exist, it results in a run-time error.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n

                          \"Samacheer<\/p>\n

                          Question 3.
                          \nAssume a=15, b=20; What will be the result of the following operations?
                          \na) a&b
                          \nb) a|b
                          \nc) aAb
                          \nd)a>>3
                          \ne) (~b)
                          \nAnswer:
                          \n\"Samacheer<\/p>\n

                          11th Computer Science Guide Introduction to C++ Additional Questions and Answers<\/h3>\n

                          Choose The Correct Answer<\/span><\/p>\n

                          Question 1.
                          \nThe latest standard version published in December 2017 as ISO\/IEC …………….. which is informally known as C++ 17.
                          \n(a) 14882 : 1998
                          \n(b) 14883 : 2017
                          \n(c) 14882 : 2017
                          \n(d) 14882 : 2000
                          \nAnswer:
                          \n(c) 14882 : 2017<\/p>\n

                          Question 2.
                          \nC++ language was developed at ……………….
                          \na) Microsoft
                          \nb) Borland International
                          \nc) AT & T Bell Lab
                          \nd) Apple Corporation
                          \nAnswer:
                          \nc) AT & T Bell Lab<\/p>\n

                          Question 3.
                          \nAn integer constant is also called……………..
                          \n(a) fixed point constant
                          \n(b) floating-point constant
                          \n(c) real constants
                          \n(d) Boolean literals
                          \nAnswer:
                          \n(a) fixed point constant<\/p>\n

                          \"Samacheer<\/p>\n

                          Question 4.
                          \nC++supports ………… programming paradigms.
                          \na) Procedural
                          \nb) Object-Oriented
                          \nc) Both A and B
                          \nd) None of these
                          \nAnswer:
                          \nc) Both A and B<\/p>\n

                          Question 5.
                          \n…………….. relational operators are binary operators.
                          \n(a) 7
                          \n(b) 8
                          \n(c) 6
                          \n(d) 2
                          \nAnswer:
                          \n(c) 6<\/p>\n

                          Question 6.
                          \nC++ is a superset (extension) of …………….. language.
                          \na) Ada
                          \nb) BCPL
                          \nc) Simula
                          \nd) C
                          \nAnswer:
                          \nd) C<\/p>\n

                          \"Samacheer<\/p>\n

                          Question 7
                          \n…………….. used to label a statement.
                          \n(a) colon
                          \n(b) comma
                          \n(c) semicolon
                          \n(d) parenthesis
                          \nAnswer:
                          \n(a) colon<\/p>\n

                          Question 8.
                          \nThe name C++ was coined by …………….
                          \na) Lady Ada Lovelace
                          \nb) Rick Mascitti
                          \nc) Dennis Ritchie
                          \nd) Bill Gates
                          \nAnswer:
                          \nb) Rick Mascitti<\/p>\n

                          Question 9.
                          \nIDE stands for ……………..
                          \n(a) Integrated Development Environment
                          \n(b) International Development Environment
                          \n(c) Integrated Digital Environment
                          \n(d) None of the above
                          \nAnswer:
                          \n(a) Integrated Development Environment<\/p>\n

                          \"Samacheer<\/p>\n

                          Question 10.
                          \nTill 1983, C++ was referred to as …………………
                          \na) New C
                          \nb) C with Classes
                          \nc) Both A and B
                          \nd) None of these
                          \nAnswer:
                          \nc) Both A and B<\/p>\n

                          Question 11.
                          \n…………….. data type signed more precision fractional value.
                          \n(a) char
                          \n(b) short
                          \n(c) long double
                          \n(d) signed doubles
                          \nAnswer:
                          \n(c) long double<\/p>\n

                          Question 12.
                          \nC# (C-Sharp), D, Java, and newer versions of C languages have been influenced by ………………. language.
                          \na) Ada
                          \nb) BCPL
                          \nc) Simula
                          \nd) C++
                          \nAnswer:
                          \nd) C++<\/p>\n

                          \"Samacheer<\/p>\n

                          Question 13.
                          \n…………….. manipulator is the member of iomanip header file.
                          \n(a) setw
                          \n(b) setfill
                          \n(c) setf
                          \n(d) all the above
                          \nAnswer:
                          \n(d) all the above<\/p>\n

                          Question 14.
                          \nC++is ……………… language.
                          \na) Structural
                          \nb) Procedural
                          \nc) Object-oriented
                          \nd) None of these
                          \nAnswer:
                          \nc) Object-oriented<\/p>\n

                          Question 15.
                          \nC++ includes ………………..
                          \na) Classes and Inheritance
                          \nb) Polymorphism
                          \nc) Data abstraction and Encapsulation
                          \nd) All the above
                          \nAnswer:
                          \nd) All the above<\/p>\n

                          \"Samacheer<\/p>\n

                          Question 16.
                          \nC language does not allow ………………
                          \na) Exception handling
                          \nb) Inheritance
                          \nc) Function overloading
                          \nd) All the above
                          \nAnswer:
                          \nd) All the above<\/p>\n

                          Question 17.
                          \n……………. is a set of characters which are allowed to write a C++ program.
                          \na) Character set
                          \nb) Tokens
                          \nc) Punctuators
                          \nd) None of these
                          \nAnswer:
                          \na) Character set<\/p>\n

                          Question 18.
                          \nA character represents any …………………..
                          \na) Alphabet
                          \nb) Number
                          \nc) Any other symbol (special characters)
                          \nd) All the above
                          \nAnswer:
                          \nd) All the above<\/p>\n

                          \"Samacheer<\/p>\n

                          Question 19.
                          \nMost of the Character set, Tokens, and expressions are very common to C based programming languages like ………………..
                          \na) C++
                          \nb) Java
                          \nc) PHP
                          \nd) All the above
                          \nAnswer:
                          \nd) All the above<\/p>\n

                          Question 20.
                          \n…………… is a white space.
                          \na) Horizontal tab
                          \nb) Carriage return
                          \nc) Form feed
                          \nd) All the above
                          \nAnswer:
                          \nd) All the above<\/p>\n

                          Question 21.
                          \nC++ program statements are constructed by many different small elements called……………….
                          \na) Lexical units
                          \nb) Lexical elements
                          \nc) Tokens
                          \nd) All the above
                          \nAnswer:
                          \nd) All the above<\/p>\n

                          \"Samacheer<\/p>\n

                          Question 22.
                          \n…………… is a C++token.
                          \na) Keywords
                          \nb) Identifiers and Literals
                          \nc) Punctuators and Operators
                          \nd) All the above
                          \nAnswer:
                          \nd) All the above<\/p>\n

                          Question 23.
                          \nThe smallest individual unit in a program is known as a ……………
                          \na) Token
                          \nb) Lexical unit
                          \nc) Token or a Lexical unit
                          \nd) None of these
                          \nAnswer:
                          \nc) Token or a Lexical unit<\/p>\n

                          Question 24.
                          \n………………… are the reserved words which convey specific meaning to the C++ compiler.
                          \na) Keywords
                          \nb) Identifiers and Literals
                          \nc) Punctuators and Operators
                          \nd) All the above
                          \nAnswer:
                          \na) Keywords<\/p>\n

                          \"Samacheer<\/p>\n

                          Question 25.
                          \n………………. are the essential elements to construct C++ programs.
                          \na) Keywords
                          \nb) Identifiers and Literals
                          \nc) Punctuators and Operators
                          \nd)All the above
                          \nAnswer:
                          \na) Keywords<\/p>\n

                          Question 26.
                          \nMost of the keywords are common to …………… languages.
                          \na) C, and C++
                          \nb) C++ and Java
                          \nc) C, C++ and Java
                          \nd) None of these
                          \nAnswer:
                          \nc) C, C++ and Java<\/p>\n

                          Question 27.
                          \n……………. is a case sensitive programming language.
                          \na) C, and C++
                          \nb) C++ and Java
                          \nc) C, C++ and Java
                          \nd) None of these
                          \nAnswer:
                          \nc) C, C++ and Java<\/p>\n

                          \"Samacheer<\/p>\n

                          Question 28.
                          \nIn ……………. language, all the keywords must be in lowercase.
                          \na) C, and C++
                          \nb) C++ and Java
                          \nc) C, C++ and Java
                          \nd) None of these
                          \nAnswer:
                          \nc) C, C++ and Java<\/p>\n

                          Question 29.
                          \n……………… is a new keyword in C++.
                          \na) using
                          \nb) namespace
                          \nc) std
                          \nd) All the above
                          \nAnswer:
                          \nd) All the above<\/p>\n

                          Question 30.
                          \n…………….. is a new keyword in C++.
                          \na) bal
                          \nb) static_cast
                          \nc) dynamic_cast
                          \nd) All the above
                          \nAnswer:
                          \nd) All the above<\/p>\n

                          \"Samacheer<\/p>\n

                          Question 31.
                          \n………….. is a new keyword in C++.
                          \na) true
                          \nb) false
                          \nc) Both A and B
                          \nc) None of these
                          \nAnswer:
                          \nc) None of these<\/p>\n

                          Question 32.
                          \nIdentifiers are the user-defined names given to …………..
                          \na) Variables and functions
                          \nb)Arrays
                          \nc) Classes
                          \nd) All the above
                          \nAnswer:
                          \nd) All the above<\/p>\n

                          Question 33.
                          \nIdentifiers containing a …………. should be avoided by users.
                          \na) Double underscore
                          \nb) Underscore
                          \nc) number
                          \nd) None of these
                          \nAnswer:
                          \na) Double underscore<\/p>\n

                          \"Samacheer<\/p>\n

                          Question 34.
                          \nThe first character of an identifier must be an ………….
                          \na) Alphabet
                          \nb) Underscore (_)
                          \nc) Alphabet or Underscore (_)
                          \nc) None of these
                          \nAnswer:
                          \nc) Alphabet or Underscore (_)<\/p>\n

                          Question 35.
                          \nOnly …………… is permitted for the variable name.
                          \na) Alphabets
                          \nb) Digits
                          \nc) Underscore
                          \nd) All the above
                          \nAnswer:
                          \nd) All the above<\/p>\n

                          Question 36.
                          \nIdentify the correct statement from the following.
                          \na) C++ is case sensitive as it treats upper and lower-case characters differently.
                          \nb) Reserved words or keywords cannot be used as an identifier name.
                          \nc) As per ANSI standards, C++ places no limit on its length.
                          \nd) All the above
                          \nAnswer:
                          \nd) All the above<\/p>\n

                          \"Samacheer<\/p>\n

                          Question 37.
                          \nANSI stands for …………..
                          \na) All National Standards Institute
                          \nb) Advanced National Standards Institute
                          \nc) American National Standards Institute
                          \nd) None of these
                          \nAnswer:
                          \nc) American National Standards Institute<\/p>\n

                          Question 38.
                          \nIdentify the invalid variable name from the following.
                          \na) num-add
                          \nb) this
                          \nc) 2myfile
                          \nd) All the above
                          \nAnswer:
                          \nd) All the above<\/p>\n

                          Question 39.
                          \nIdentify the odd one from the following.
                          \na) Int
                          \nb) _add
                          \nc) int
                          \nd) tail marks
                          \nAnswer:
                          \nc) int<\/p>\n

                          \"Samacheer<\/p>\n

                          Question 40.
                          \n……………… are data items whose values do not change during the execution of a program.
                          \na) Literals
                          \nb) Constants
                          \nc) Identifiers
                          \nd) Both A and B
                          \nAnswer:
                          \nd) Both A and B<\/p>\n

                          Question 41.
                          \n…………. is a type constant in C++.
                          \na) Boolean constant
                          \nb) Character constant
                          \nc) String constant
                          \nd) All the above
                          \nAnswer:
                          \nd) All the above<\/p>\n

                          Question 42.
                          \n…………… is a type of numeric constant.
                          \na) Fixed point constant
                          \nb) Floating-point constant
                          \nc) Both A and B
                          \nd) None of these
                          \nAnswer:
                          \nc) Both A and B<\/p>\n

                          \"Samacheer<\/p>\n

                          Question 43.
                          \n……………. are whole numbers without any fractions.
                          \na) Integers
                          \nb) Real constant
                          \nc) Floating-point constant
                          \nd) None of these
                          \nAnswer:
                          \na) Integers<\/p>\n

                          Question 44.
                          \nIn C++, there are …………….. types of integer constants.
                          \na) Two
                          \nb) Three
                          \nc) Four
                          \nd) Six
                          \nAnswer:
                          \nb) Three<\/p>\n

                          Question 45.
                          \nIn C++, ……………… is a type of integer constant.
                          \na) Decimal
                          \nb) Octal
                          \nc) Hexadecimal
                          \nd) All the above
                          \nAnswer:
                          \nd) All the above<\/p>\n

                          \"Samacheer<\/p>\n

                          Question 46.
                          \nAny sequence of one or more digits (0 …. 9) is called ……………… integer constant.
                          \na) Decimal
                          \nb) Octal
                          \nc) Hexadecimal
                          \nd) All the above
                          \nAnswer:
                          \na) Decimal<\/p>\n

                          Question 47.
                          \nAny sequence of one or more octal values (0 …. 7) that begins with 0 is considered as a(n) …………… constant.
                          \na) Decimal
                          \nb) Octal
                          \nc) Hexadecimal
                          \nd) All the above
                          \nAnswer:
                          \nb) Octal<\/p>\n

                          Question 48.
                          \nWhen you use a fractional number that begins with 0, C++ has consider the number as ………………..
                          \na) An integer not an Octal
                          \nb) A floating-point not an Octal
                          \nc) An integer not a Hexadecimal
                          \nd) None of these
                          \nAnswer:
                          \na) An integer not an Octal<\/p>\n

                          \"Samacheer<\/p>\n

                          Question 49.
                          \nAny sequence of one or more Hexadecimal values (0 …. 9, A …. F) that starts with Ox or OX is considered as a(n) ………….. constant.
                          \na) Decimal
                          \nb) Octal
                          \nc) Hexadecimal
                          \nd) All the above
                          \nAnswer:
                          \nc) Hexadecimal<\/p>\n

                          Question 50.
                          \nIdentify the invalid octal constant,
                          \na) 05,600
                          \nb) 04.56
                          \nc) 0158
                          \nd) All the above
                          \nAnswer:
                          \nd) All the above<\/p>\n

                          Question 51.
                          \nIdentify the valid hexa decimal constant
                          \na) 0X1,A5
                          \nb) 0X.14E
                          \nc) CAFE
                          \nd) CPP
                          \nAnswer:
                          \nc) CAFE<\/p>\n

                          \"Samacheer<\/p>\n

                          Question 52.
                          \nThe suffix ………….. added with any constant forces that to be represented as a long constant.
                          \na) L or I
                          \nb) U or u
                          \nc) LO
                          \nd) Lg
                          \nAnswer:
                          \na) L or I<\/p>\n

                          Question 53.
                          \nThe suffix …………… added with any constant forces that to be represented as an unsigned constant.
                          \na) L or I
                          \nb) U or u
                          \nc) US
                          \nd) us
                          \nAnswer:
                          \nb) U or u<\/p>\n

                          Question 54.
                          \nA _______ constant is a numeric constant having a fractional component.
                          \na) Real
                          \nb) Floating point
                          \nc) Real or Floating point
                          \nd) None of these
                          \nAnswer:
                          \nc) Real or Floating point<\/p>\n

                          \"Samacheer<\/p>\n

                          Question 55.
                          \n……………. constants may be written in fractional form or in exponent form.
                          \na) Real
                          \nb) String
                          \nc) Character
                          \nd) Integer constant
                          \nAnswer:
                          \na) Real<\/p>\n

                          Question 56.
                          \nExponent form of real constants consists of ………….. parts.
                          \na) three
                          \nb) two
                          \nc) four
                          \nd) five
                          \nAnswer:
                          \nb) two<\/p>\n

                          Question 57.
                          \nExponent form of real constants consists of ……………. part.
                          \na) Mantissa
                          \nb) Exponent
                          \nc) Both A and B
                          \nd) None of these
                          \nAnswer:
                          \nc) Both A and B<\/p>\n

                          \"Samacheer<\/p>\n

                          Question 58.
                          \nThe mantissa must be a(n) …………. constant.
                          \na) Integer
                          \nb) Real
                          \nc) Either A or B
                          \nd) None of these
                          \nAnswer:
                          \nc) Either A or B<\/p>\n

                          Question 59.
                          \n58.64 can be written as …………….
                          \na) 5.864E1
                          \nb) 0.5864E2
                          \nc) 5864E-2
                          \nd) All the above
                          \nAnswer:
                          \nd) All the above<\/p>\n

                          Question 60.
                          \nInternally boolean true has value ……………
                          \na) 0
                          \nb) 1
                          \nc) -1
                          \nd) None of these
                          \nAnswer:
                          \nb) 1<\/p>\n

                          \"Samacheer<\/p>\n

                          Question 61.
                          \nInternally boolean false has value …………….
                          \na) 0
                          \nb) 1
                          \nc) -1
                          \nd) None of these
                          \nAnswer:
                          \na) 0<\/p>\n

                          Question 62.
                          \nA character constant is any valid single character enclosed within ………….. quotes.
                          \na) Double
                          \nb) Single
                          \nc) No
                          \nd) None of these
                          \nAnswer:
                          \nb) Single<\/p>\n

                          Question 63.
                          \nIdentify the odd one from the following,
                          \na) ‘A’
                          \nb) ‘2’
                          \nc) ‘$’
                          \nd) “A”
                          \nAnswer:
                          \nd) “A”<\/p>\n

                          \"Samacheer<\/p>\n

                          Question 64.
                          \nThe value of a single character constant has an equivalent ………….. value.
                          \na) BCD
                          \nb) ASCII
                          \nc) Nibble
                          \nd) None of these
                          \nAnswer:
                          \nb) ASCII<\/p>\n

                          Question 65.
                          \nThe ASCII value of ‘A’ is …………..
                          \na) 65
                          \nb) 97
                          \nc) 42
                          \nd) 75
                          \nAnswer:
                          \na) 65<\/p>\n

                          Question 66.
                          \nThe ASCII value of ‘a’ is ……………
                          \na) 65
                          \nb) 97
                          \nc) 42
                          \nd) 75
                          \nAnswer:
                          \nb) 97<\/p>\n

                          \"Samacheer<\/p>\n

                          Question 67.
                          \nC++ allows certain non-printable characters represented as ……………. constants.
                          \na) Integer
                          \nb) Real
                          \nc) Character
                          \nd) String
                          \nAnswer:
                          \nc) Character<\/p>\n

                          Question 68.
                          \nThe non-printable characters can be represented by using …………………………
                          \na) Escape sequences
                          \nb) String
                          \nc) Boolean
                          \nd) None of these
                          \nAnswer:
                          \na) Escape sequences<\/p>\n

                          Question 69.
                          \nAn escape sequence is represented by a backslash followed by …………. character(s).
                          \na) One
                          \nb) Two
                          \nc) One or Two
                          \nd) None of these
                          \nAnswer:
                          \nc) One or Two<\/p>\n

                          \"Samacheer<\/p>\n

                          Question 70.
                          \n______ is escape sequence for audible or alert bell.
                          \na) \\a
                          \nb)\\b
                          \nc) \\n
                          \nd)\\f
                          \nAnswer:
                          \na) \\a<\/p>\n

                          Question 71
                          \n_______ is escape sequence for backspace.
                          \na)\\a
                          \nb)\\b
                          \nc) \\n
                          \nd) \\f
                          \nAnswer:
                          \nb)\\b<\/p>\n

                          Question 72.
                          \n______ is escape sequence for form feed.
                          \na)\\a
                          \nb)\\b .
                          \nc) \\n
                          \nd) \\f
                          \nAnswer:
                          \nd) \\f<\/p>\n

                          \"Samacheer<\/p>\n

                          Question 73.
                          \n______ is escape sequence for new line or line feed.
                          \na) a
                          \nb)\\b
                          \nc)\\n
                          \nd)\\f
                          \nAnswer:
                          \nc)\\n<\/p>\n

                          Question 74.
                          \n……………. is escape sequence for carriage return.
                          \na)\\r
                          \nb)\\c
                          \nc)\\n
                          \nd)\\cr
                          \nAnswer:
                          \na)\\r<\/p>\n

                          Question 75.
                          \n______ is escape sequence for horizontal tab.\u2019
                          \na)\\a \u2018
                          \nb)\\b
                          \nc)\\t
                          \nd)\\f
                          \nAnswer:
                          \nc)\\t<\/p>\n

                          \"Samacheer<\/p>\n

                          Question 76.
                          \n_______ is escape sequence for vertical tab.
                          \na)\\v
                          \nb)\\b
                          \nc) \\t
                          \nd) \\f
                          \nAnswer:
                          \na)\\v<\/p>\n

                          Question 77.
                          \n………………. is escape sequence for octal number.
                          \na) \\On
                          \nb) \\xHn
                          \nc)\\O
                          \nd)O
                          \nAnswer:
                          \na) \\On<\/p>\n

                          Question 78.
                          \n______ is escape sequence for hexadecimal number.
                          \na) \\On
                          \nb) \\xHn
                          \nc)\\O
                          \nd)\\O
                          \nAnswer:
                          \nb) \\xHn<\/p>\n

                          \"Samacheer<\/p>\n

                          Question 79
                          \n______ \u00a1s escape sequence for Null character.
                          \na) \\On
                          \nb) \\xHn
                          \nc)\\O
                          \nd)\\n
                          \nAnswer:
                          \nc)\\O<\/p>\n

                          Question 80.
                          \n______ \u00a1s escape sequence for Inserting?
                          \na) \\?
                          \nb) \\\\
                          \nc)\\\u2019
                          \nd)\\\u201d
                          \nAnswer:
                          \na) \\?<\/p>\n

                          Question 81.
                          \n______ is an escape sequence for inserting a single quote.
                          \na)\\?
                          \nb)\\\\
                          \nc) \\\u2018
                          \nd) \\\u201c
                          \nAnswer:
                          \nc) \\\u2018<\/p>\n

                          \"Samacheer<\/p>\n

                          Question 82.
                          \n______ is escape sequence for inserting double quote.
                          \na)\\?
                          \nb)\\\\
                          \nc) \\\u2018
                          \nd) \\\u201c
                          \nAnswer:
                          \nd) \\\u201c<\/p>\n

                          Question 83.
                          \n______ is escape sequence for inserting
                          \na)\\?\u2019
                          \nb)\\\\
                          \nc) \\\u2018
                          \nd) \\\u201c
                          \nAnswer:
                          \nb)\\\\<\/p>\n

                          Question 84.
                          \nASCII was first developed and published in 1963 by the …………. Committee, a part of the American Standards Association (ASA).
                          \na) X3
                          \nb) A3
                          \nc) ASA
                          \nd) None of these
                          \nAnswer:
                          \na) X3<\/p>\n

                          \"Samacheer<\/p>\n

                          Question 85.
                          \nSequence of characters enclosed within ………. quotes are called as String literals,
                          \na) Single
                          \nb) Double
                          \nc) No
                          \nd) None of these
                          \nAnswer:
                          \nb) Double<\/p>\n

                          Question 86.
                          \nBy default, string literals are automatically added with a special character………..at the end.
                          \na) ‘\\0’ (Null)
                          \nb) ‘\\S’
                          \nc) V
                          \nd) None of these
                          \nAnswer:
                          \na) ‘\\0’ (Null)<\/p>\n

                          Question 87.
                          \nIdentify the valid string constant from the following.
                          \na) “A”
                          \nb) “Welcome”
                          \nc) “1234”
                          \nd) All the above
                          \nAnswer:
                          \nd) All the above<\/p>\n

                          \"Samacheer<\/p>\n

                          Question 88.
                          \nThe symbols which are used, to do some mathematical or logical operations are called as ………………
                          \nb) Operands
                          \nd) None of these
                          \na) Operators
                          \nc) Expressions
                          \nAnswer:
                          \na) Operators<\/p>\n

                          Question 89.
                          \nThe data items or values that the operators act upon are called as ……………
                          \na) Operators
                          \nb) Operands
                          \nc) Expressions
                          \nd) None of these
                          \nAnswer:
                          \nb) Operands<\/p>\n

                          Question 90.
                          \nIn C++, the operators are classified as ………… types on the basis of the number of operands,
                          \na) two
                          \nb) three
                          \nc) four ,
                          \nd) five
                          \nAnswer:
                          \nb) three<\/p>\n

                          \"Samacheer<\/p>\n

                          Question 91.
                          \n………….. operators require only one operand.
                          \na) Unary
                          \nb) Binary
                          \nc) Ternary
                          \nd) None of these
                          \nAnswer:
                          \na) Unary<\/p>\n

                          Question 92.
                          \n…………… operators require two operands.
                          \na) Unary
                          \nb) Binary
                          \nc) Ternary
                          \nd) None of these
                          \nAnswer:
                          \nb) Binary<\/p>\n

                          Question 93.
                          \n………… operators require three operands.
                          \na) Unary
                          \nb) Binary
                          \nc) Ternary
                          \nd) None of these
                          \nAnswer:
                          \nc) Ternary<\/p>\n

                          \"Samacheer<\/p>\n

                          Question 94.
                          \nC++ operators are classified as …………… types
                          \na) 7
                          \nb) 3
                          \nc) 10
                          \nd) 4
                          \nAnswer:
                          \na) 7<\/p>\n

                          Question 95.
                          \n…………… operators perform simple operations like addition, subtraction, multiplication, division etc.
                          \na) Logical
                          \nb) Relational
                          \nc) Arithmetic
                          \nd) Bitwise
                          \nAnswer:
                          \nc) Arithmetic<\/p>\n

                          Question 96.
                          \n…………… operator is used to find the remainder of a division.
                          \na) \/
                          \nb) %
                          \nc) *
                          \nd) **
                          \nAnswer:
                          \nb) %<\/p>\n

                          \"Samacheer<\/p>\n

                          Question 97.
                          \n…………….. operator is called as Modulus operator.
                          \na) \/
                          \nb)%
                          \nc) *
                          \nd) **
                          \nAnswer:
                          \nb)%<\/p>\n

                          Question 98.
                          \nAn increment or decrement operator acts upon a …………….. operand and returns a new value,
                          \na) Single
                          \nb) Two
                          \nc) Three
                          \nd) None of these
                          \nAnswer:
                          \na) Single<\/p>\n

                          Question 99.
                          \n………….. is a unary operator.
                          \na) ++
                          \nb) \u2014
                          \nc) Both ++ and —
                          \nd) None of these
                          \nAnswer:
                          \nc) Both ++ and —<\/p>\n

                          \"Samacheer<\/p>\n

                          Question 100.
                          \nThe increment operator adds …………….. to its operand.
                          \na) 1
                          \nb) 0\\
                          \nc) -1
                          \nd) None of these
                          \nAnswer:
                          \na) 1<\/p>\n

                          Question 101.
                          \nThe decrement operator subtracts …………… from its operand.
                          \na) 1
                          \nb) 0\\
                          \nc) -1
                          \nd) None of these
                          \nAnswer:
                          \na) 1<\/p>\n

                          Question 102.
                          \nThe …………….. operators can be placed either as prefix (before) or as postfix (after) to a variable.
                          \na) ++
                          \nb) –
                          \nc) ++or–
                          \nd) None of these
                          \nAnswer:
                          \nc) ++or–<\/p>\n

                          \"Samacheer<\/p>\n

                          Question 103.
                          \nWith the prefix version, C++ performs the increment\/decrement………….. using the operand.
                          \na) Before
                          \nb) After
                          \nc) When required
                          \nd) None of these
                          \nAnswer:
                          \na) Before<\/p>\n

                          Question 104.
                          \nWith the postfix version, C++ performs the increment\/decrement…………….. using the operand.
                          \na) Before
                          \nb) After
                          \nc) When required
                          \nd) None of these
                          \nAnswer:
                          \nb) After<\/p>\n

                          Question 105.
                          \nWith the postfix version, C++ uses the value of the operand in evaluating the expression …………… incrementing \/decrementing its present value.
                          \na) Before
                          \nb) After
                          \nc) When required
                          \nd) None of these
                          \nAnswer:
                          \na) Before<\/p>\n

                          \"Samacheer<\/p>\n

                          Question 106.
                          \n……………… operators are used to determining the relationship between its operands.
                          \na) Logical
                          \nb) Relational
                          \nc) Arithmetic
                          \nd) Bitwise
                          \nAnswer:
                          \nb) Relational<\/p>\n

                          Question 107.
                          \nWhen the relational operators are applied on two operands, the result will be a …………… value.
                          \na) Boolean
                          \nb) Numeric
                          \nc) Character
                          \nd) String
                          \nAnswer:
                          \na) Boolean<\/p>\n

                          Question 108.
                          \nC++ provides …………. relational operators.
                          \na) Seven
                          \nb) six
                          \nc) Eight
                          \nd) Five
                          \nAnswer:
                          \nb) six<\/p>\n

                          \"Samacheer<\/p>\n

                          Question 109.
                          \nAll six relational operators are ……………
                          \na) Unary
                          \nb) Binary
                          \nc) Ternary
                          \nd) None of these
                          \nAnswer:
                          \nb) Binary<\/p>\n

                          Question 110.
                          \nA logical operator is used to evaluate …………… expressions.
                          \na) Logical and Relational
                          \nb) Logical
                          \nc) Relational
                          \nd) None of these
                          \nAnswer:
                          \na) Logical and Relational<\/p>\n

                          Question 111.
                          \nWhich logical operator returns 1 (True), if both expressions are true, otherwise it returns 0 (false)?
                          \na) AND
                          \nb) OR
                          \nc) NOT
                          \nd) All the above
                          \nAnswer:
                          \na) AND<\/p>\n

                          \"Samacheer<\/p>\n

                          Question 112.
                          \nWhich logical operator returns 1 (True) if either one of the expressions is true. It returns 0 (false) if both the expressions are false?
                          \na) AND
                          \nb) OR
                          \nc) NOT
                          \nd) All the above
                          \nAnswer:
                          \nb) OR<\/p>\n

                          Question 113.
                          \nWhich logical operator simply negates or inverts the true value?
                          \na) AND
                          \nb) OR
                          \nc) NOT
                          \nd) All the above
                          \nAnswer:
                          \nc) NOT<\/p>\n

                          Question 114.
                          \nAND, OR both are ……………. operators.
                          \na) Unary
                          \nb) Binary
                          \nc) Ternary
                          \nd) None of these
                          \nAnswer:
                          \nb) Binary<\/p>\n

                          \"Samacheer<\/p>\n

                          Question 115.
                          \nNOT is a(n) …………… operator.
                          \na) Unary
                          \nb) Binary
                          \nc) Ternary
                          \nd) None of these
                          \nAnswer:
                          \na) Unary<\/p>\n

                          Question 116.
                          \nIdentify the correct statement from the following.
                          \na) The logical operators act upon the operands that are themselves called logical expressions.
                          \nb) Bitwise operators work on each bit of data and perform the bit-by-bit operations.
                          \nc) There are two bitwise shift operators in C++, Shift left (<<) & Shift right (>>).
                          \nd) All the above
                          \nAnswer:
                          \nd) All the above<\/p>\n

                          Question 117.
                          \nIn C++, there are …………… kinds of bitwise operator.
                          \na) Three
                          \nb) Four
                          \nc) Two
                          \nd) Five
                          \nAnswer:
                          \na) Three<\/p>\n

                          Question 118.
                          \n…………. is a type of bitwise operator.
                          \na) Logical bitwise operators
                          \nb) Bitwise shift operators
                          \nc) One’s compliment operators
                          \nd) All the above
                          \nAnswer:
                          \nd) All the above<\/p>\n

                          \"Samacheer<\/p>\n

                          Question 119.
                          \n______ will return 1 (True) if both the operands are having the value 1 (True); Otherwise, it will return 0 (False).
                          \na) Bitwise AND (&) .
                          \nb) Bitwise OR (|)
                          \nc) Bitwise Exclusive OR(A)
                          \nd) None of these
                          \nAnswer:
                          \na) Bitwise AND (&)<\/p>\n

                          Question 120.
                          \n………… will return 1 (True) if any one of the operands is having a value 1 (True); It returns 0 (False) if both the operands are having the value 0 (False)
                          \na) Bitwise AND (&)
                          \nb) Bitwise OR (|)
                          \nc) Bitwise Exclusive OR(A)
                          \nd) None of these
                          \nAnswer:
                          \nb) Bitwise OR (|)<\/p>\n

                          Question 121.
                          \n…………. will return 1 (True) if only one of the operand is having a value 1 (True).If both are True or both are False, it will return 0 (False).
                          \na) Bitwise AND (&)
                          \nb) Bitwise OR (|)
                          \nc) Bitwise Exclusive OR(A)
                          \nd) None of these
                          \nAnswer:
                          \nc) Bitwise Exclusive OR(A)<\/p>\n

                          \"Samacheer<\/p>\n

                          Question 122.
                          \nThere are …………… bitwise shift operators in C++.
                          \na) Three
                          \nb) Two
                          \nc) Four
                          \nd) Five
                          \nAnswer:
                          \nb) Two<\/p>\n

                          Question 123.
                          \n……………. is a type of * .wise shift operator in
                          \nC++.
                          \na) Shift left
                          \nb) Shift right
                          \nc) Both A and B
                          \nd) None of these
                          \nAnswer:
                          \nc) Both A and B<\/p>\n

                          Question 124.
                          \n……………. is a type of bitwise shift left operator in C++.
                          \na) <<
                          \nb) >>
                          \nc) &&
                          \nd) ||
                          \nAnswer:
                          \na) <<<\/p>\n

                          \"Samacheer<\/p>\n

                          Question 125.
                          \n…………. is a type of bitwise shift right operator in C++.
                          \na) <<
                          \nb) >>
                          \nc) &&
                          \nd) ||
                          \nAnswer:
                          \nb) >><\/p>\n

                          Question 126.
                          \nThe value of the left operand is moved to the left by the number of bits specified by the right operand using …………. operator.
                          \na) <<
                          \nb) >>
                          \nc) &&
                          \nd) ||
                          \nAnswer:
                          \na) <<<\/p>\n

                          Question 127.
                          \nThe value of the left operand is moved to right by the number of bits specified by the right operand using …………. operator.
                          \na) <<
                          \nb) >>
                          \nc) &&
                          \nd) ||
                          \nAnswer:
                          \nb) >><\/p>\n

                          \"Samacheer<\/p>\n

                          Question 128.
                          \nRight operand should be an unsigned integer for …………… operator.
                          \na) Arithmetic
                          \nb) Relational
                          \nc) Bitwise Shift
                          \nd) None of these
                          \nAnswer:
                          \nc) Bitwise Shift<\/p>\n

                          Question 129.
                          \n………… is the bitwise one’s complement operator.
                          \na) <<
                          \nb) >>
                          \nc) &&
                          \nd) ~
                          \nAnswer:
                          \nd) ~<\/p>\n

                          Question 130.
                          \nThe bitwise ………….. operator inverts all the bits in a binary pattern, that is, all l’s become 0 and all 0’s become 1.
                          \na) Shift left
                          \nb) Shift right
                          \nc) One’s complement
                          \nd) None of these
                          \nAnswer:
                          \nc) One’s complement<\/p>\n

                          \"Samacheer<\/p>\n

                          Question 131.
                          \n…………… is a unary operator.
                          \na) Shift left
                          \nb) Shift right
                          \nc) Bitwise one’s complement
                          \nd) None of these
                          \nAnswer:
                          \nc) Bitwise one’s complement<\/p>\n

                          Question 132.
                          \n………….. operator is used to assigning a value to a variable which is on the left-hand side of an assignment statement.
                          \na) Assignment
                          \nb) Logical
                          \nc) Bitwise
                          \nd) Conditional
                          \nAnswer:
                          \na) Assignment<\/p>\n

                          Question 133.
                          \n…………. is commonly used as the assignment operator in all computer programming languages.
                          \na) :=
                          \nb) ==
                          \nc) =
                          \nd) None of these
                          \nAnswer:
                          \nc) =<\/p>\n

                          \"Samacheer<\/p>\n

                          Question 134.
                          \n…………… operator copies the value at the right side of the operator to the left side variable,
                          \na) Assignment
                          \nb) Logical
                          \nc) Bitwise
                          \nd) Conditional
                          \nAnswer:
                          \na) Assignment<\/p>\n

                          Question 135.
                          \nThe assignment operator is a(n) ……………….. operator.
                          \na) Unary
                          \nb) Binary
                          \nc) Ternary
                          \nd) Conditional
                          \nAnswer:
                          \nb) Binary<\/p>\n

                          Question 136.
                          \nHow many conditional operators are used in C++?
                          \na) one
                          \nb) two
                          \nc) three
                          \nd) four
                          \nAnswer:
                          \na) one<\/p>\n

                          \"Samacheer<\/p>\n

                          Question 137.
                          \n…………….. operator is a Ternary Operator.
                          \na) Assignment
                          \nb) Logical
                          \nc) Bitwise
                          \nd) Conditional
                          \nAnswer:
                          \nd) Conditional<\/p>\n

                          Question 138.
                          \n…………… operator is used as an alternative to if … else control statement.
                          \na) Assignment
                          \nb) Logical
                          \nc) Bitwise
                          \nd) Conditional
                          \nAnswer:
                          \nd) Conditional<\/p>\n

                          Question 139.
                          \n……………. is a pointer to a variable operator.
                          \na) &
                          \nb) *
                          \nc) \u2192
                          \nd) \u2192 *
                          \nAnswer:
                          \nb) *<\/p>\n

                          \"Samacheer<\/p>\n

                          Question 140.
                          \n…………… is an address operator.
                          \na) &
                          \nb) *
                          \nc) \u2192
                          \nd) \u2192*
                          \nAnswer:
                          \na) &<\/p>\n

                          Question 141.
                          \n……………. is a direct component selector operator.
                          \na) .(dot)
                          \nb) *
                          \nc) \u2192
                          \nd) \u2192*
                          \nAnswer:
                          \na) .(dot)<\/p>\n

                          Question 142.
                          \n…………… is an indirect component selector operator.
                          \na) .(dot)
                          \nb) *
                          \nc) \u2192
                          \nd) \u2192*
                          \nAnswer:
                          \nc) \u2192<\/p>\n

                          \"Samacheer<\/p>\n

                          Question 143.
                          \n…………. is a dereference operator.
                          \na) . (dot)
                          \nb) .*
                          \nc) \u2192
                          \nd) \u2192*
                          \nAnswer:
                          \nb) .*<\/p>\n

                          Question 144.
                          \n……………… is a dereference pointer to class member operator.
                          \na) . (dot)
                          \nb) .*
                          \nc) \u2192
                          \nd) \u2192*
                          \nAnswer:
                          \nd) \u2192*<\/p>\n

                          Question 145.
                          \n……………. is a scope resolution operator.
                          \na) .(dot)
                          \nb) .*
                          \nc) : :
                          \nd) \u2192*
                          \nAnswer:
                          \nc) : :<\/p>\n

                          \"Samacheer<\/p>\n

                          Question 146.
                          \nThe operands and the operators are grouped in a specific logical way for evaluation is called as………………
                          \na) Operator precedence
                          \nb) Operator association
                          \nc) Hierarchy
                          \nd) None of these
                          \nAnswer:
                          \nb) Operator association<\/p>\n

                          Question 147.
                          \nWhich operator is lower precedence?
                          \na) Arithmetic
                          \nb) Logical
                          \nc) Relational
                          \nd) None of these
                          \nAnswer:
                          \nb) Logical<\/p>\n

                          Question 148.
                          \nWhich operator is higher precedence?
                          \na) Arithmetic
                          \nb) Logical
                          \nc) Relational
                          \nd) None of these
                          \nAnswer:
                          \na) Arithmetic<\/p>\n

                          \"Samacheer<\/p>\n

                          Question 149.
                          \nWhich operator is the lowest precedence?
                          \na) Assignment
                          \nb) Comma
                          \nc) Conditional
                          \nd) Arithmetic
                          \nAnswer:
                          \nb) Comma<\/p>\n

                          Question 150.
                          \nIn C++, asterisk ( * ) is used for ……………… purpose.
                          \na) Multiplication
                          \nb) Pointer to a variable
                          \nc) Both A and B
                          \nd) None of these
                          \nAnswer:
                          \nc) Both A and B<\/p>\n

                          Question 151.
                          \n……………. punctuator indicates the start and the end of a block of code.
                          \na) Curly bracket { }
                          \nb) Paranthesis ()
                          \nc) Sqaure bracket [ ]
                          \nd) Angle bracket < >
                          \nAnswer:
                          \na) Curly bracket { }<\/p>\n

                          \"Samacheer<\/p>\n

                          Question 152.
                          \n……………. punctuator indicates function calls and function parameters.
                          \na) Curly bracket { }
                          \nb) Paranthesis ()
                          \nc) Square bracket [ ]
                          \nd) Angle bracket < >
                          \nAnswer:
                          \nb) Paranthesis ()<\/p>\n

                          Question 153.
                          \n……………. punctuator indicates single and multidimensional arrays.
                          \na) Curly bracket { }
                          \nb) Paranthesis ()
                          \nc) Square bracket [ ]
                          \nd) Angle bracket < >
                          \nAnswer:
                          \nc) Square bracket [ ]<\/p>\n

                          Question 154.
                          \n……………… punctuator is used as a separator in an expression.
                          \na) Comma,
                          \nb) Semicolon;
                          \nc) Colon :
                          \nd) None of these
                          \nAnswer:
                          \na) Comma,<\/p>\n

                          \"Samacheer<\/p>\n

                          Question 155.
                          \nEvery executable statement in C++ should terminate with a ………..
                          \na) Comma,
                          \nb) Semicolon;
                          \nc) Colon:
                          \nd) None of these
                          \nAnswer:
                          \nb) Semicolon;<\/p>\n

                          Question 156.
                          \n……………… punctuator is used to label a statement.
                          \na) Comma,
                          \nb) Semicolon;
                          \nc) Colon:
                          \nd) None of these
                          \nAnswer:
                          \nc) Colon:<\/p>\n

                          Question 157.
                          \n………….. is a single line comment.
                          \na) \/I
                          \nb) \/* ……..*\/
                          \nc) \\\\
                          \nd) None of these
                          \nAnswer:
                          \na) \/I<\/p>\n

                          \"Samacheer<\/p>\n

                          Question 158.
                          \n……………… is a multi line comment.
                          \na) \/\/
                          \nb) \/* *\/
                          \nc) \\\\
                          \nd) None of these
                          \nAnswer:
                          \nb) \/* *\/<\/p>\n

                          Question 159.
                          \nC++ provides the operator to get input. .
                          \na) >>
                          \nb) <<
                          \nc) ||
                          \nd) &&
                          \nAnswer:
                          \na) >><\/p>\n

                          Question 160.
                          \n…………….. operator extracts the value through the keyboard and assigns it to the variable on its right.
                          \na) >>
                          \nb) <<
                          \nc) ||
                          \nd) &&
                          \nAnswer:
                          \na) >><\/p>\n

                          \"Samacheer<\/p>\n

                          Question 161.
                          \n………………. operator is called as “Stream extraction” or “get from” operator.
                          \na) >>
                          \nb) <<
                          \nc) ||
                          \nd) &&
                          \nAnswer:
                          \na) >><\/p>\n

                          \"Samacheer<\/p>\n

                          Question 162.
                          \nGet from operator requires …………….. operands.
                          \na) three
                          \nb) two
                          \nc) four
                          \nd) five
                          \nAnswer:
                          \nb) two<\/p>\n

                          Question 163.
                          \n…………….. is the operand of get from the operator.
                          \na) Predefined identifier cin
                          \nb) Variable
                          \nc) Both A and B
                          \nd) None of these
                          \nAnswer:
                          \nc) Both A and B<\/p>\n

                          Question 164.
                          \nTo receive or extract more than one value at a time ………… operator should be used for each variable.
                          \na) >>
                          \nb) <<
                          \nc) ||
                          \nd) &&
                          \nAnswer:
                          \na) >><\/p>\n

                          \"Samacheer<\/p>\n

                          Question 165.
                          \n……………. is called cascading of operator.
                          \na) >>
                          \nb) <<
                          \nc) 11 .
                          \nd) Both A and B
                          \nAnswer:
                          \nd) Both A and B<\/p>\n

                          Question 166.
                          \nC++ provides …………… operator to perform output operation. a) >>
                          \nb) <<
                          \nc) ||
                          \nd) &&
                          \nAnswer:
                          \nb) <<<\/p>\n

                          Question 167.
                          \nThe operator ………….. is called the “Stream insertion” or “put to” operator.
                          \na) >>
                          \nb) <<
                          \nc) ||
                          \nd) &&
                          \nAnswer:
                          \nb) <<<\/p>\n

                          \"Samacheer<\/p>\n

                          Question 168.
                          \n…………… operator is used to send the strings or values of the variables on its right to the object on its left. a) >>
                          \nb) <<
                          \nc) ||
                          \nd) &&
                          \nAnswer:
                          \nb) <<<\/p>\n

                          Question 169.
                          \nThe second operand of put to operator may be a …………….
                          \na) Constant
                          \nb) Variable
                          \nc) Expression
                          \nd) Either A or B or C
                          \nAnswer:
                          \nd) Either A or B or C<\/p>\n

                          Question 170.
                          \nTo send more than one value at a time …………… operator should be used for each constant\/ variable\/expression.
                          \na) >>
                          \nb) <<
                          \nc) ||
                          \nd) &&
                          \nAnswer:
                          \na) >><\/p>\n

                          \"Samacheer<\/p>\n

                          Question 171.
                          \nThe compiler ignores …………… statement.
                          \na) Comment
                          \nb) Input
                          \nc) Output
                          \nd) Assignment
                          \nAnswer:
                          \na) Comment<\/p>\n

                          Question 172.
                          \nUsually all C++ programs begin with include statements starting with a ……………… symbol.
                          \na) $
                          \nb) #
                          \nc) {
                          \nd) %
                          \nAnswer:
                          \nb) #<\/p>\n

                          Question 173.
                          \nThe symbol …………… is a directive for the preprocessor.
                          \na) $
                          \nb) #
                          \nc) {
                          \nd) %
                          \nAnswer:
                          \nb) #<\/p>\n

                          \"Samacheer<\/p>\n

                          Question 174.
                          \n_____ means, statements are processed before the compilation process begins.
                          \na) Preprocessor
                          \nb) Include
                          \nc) Header file
                          \nd) None of these
                          \nAnswer:
                          \na) Preprocessor<\/p>\n

                          Question 175.
                          \nThe header file ……………… should include in every C++ program to implement input\/output functionalities.
                          \na) iostream
                          \nb) stdio
                          \nc) conio
                          \nd) math
                          \nAnswer:
                          \na) iostream<\/p>\n

                          Question 176.
                          \n………….. header file contains the definition of its member objects cin and cout.
                          \na) iostream
                          \nb) stdio
                          \nc) conio
                          \nd) math
                          \nAnswer:
                          \na) iostream<\/p>\n

                          \"Samacheer<\/p>\n

                          Question 177.
                          \nNamespace collects identifiers used for …………..
                          \na) Class
                          \nb) Object
                          \nc) Variables
                          \nd) All the above
                          \nAnswer:
                          \nd) All the above<\/p>\n

                          Question 178.
                          \n…………….. provides a method of preventing name conflicts in large projects.
                          \na) namespace
                          \nb) header files
                          \nc) include
                          \nd) None of these
                          \nAnswer:
                          \na) namespace<\/p>\n

                          Question 179.
                          \nEvery C++ program must have a …………… function.
                          \na) user defined
                          \nb) main( )
                          \nc) Library .
                          \nd) None of these
                          \nAnswer:
                          \nb) main( )<\/p>\n

                          \"Samacheer<\/p>\n

                          Question 180.
                          \nThe …………….. function is the starting point where all C++ programs begin their execution.
                          \na) user-defined
                          \nb) main ( )
                          \nc) Library
                          \nd) None of these
                          \nAnswer:
                          \nb) main ( )<\/p>\n

                          Question 181.
                          \nThe executable statements should be inside the ………… function.
                          \na) user-defined
                          \nb) main ( )
                          \nc) Library
                          \nd) None of these
                          \nAnswer:
                          \nb) main ( )<\/p>\n

                          Question 182.
                          \nThe statements between the …………… braces are executable statements.
                          \na) Curly bracket { }
                          \nb) Paranthesis ()
                          \nc) Square bracket [ ]
                          \nd) Angle bracket < >
                          \nAnswer:
                          \na) Curly bracket { }<\/p>\n

                          \"Samacheer<\/p>\n

                          Question 183.
                          \nFor creating and executing a C++ program, one must follow ……………. important steps.
                          \na) two
                          \nb) three
                          \nc) five
                          \nd) four
                          \nAnswer:
                          \nd) four<\/p>\n

                          Question 184.
                          \nFor creating and executing a C++ program, one must follow ……….. step.
                          \na) Creating source code and save with .cpp extension
                          \nb) Compilation
                          \nc) Execution
                          \nd) All the above
                          \nAnswer:
                          \nd) All the above<\/p>\n

                          Question 185.
                          \n………………. links the library files with the source code and verifies each and every line of code.
                          \na) Interpreter
                          \nb) Compiler
                          \nc) Loader
                          \nd) Assembler
                          \nAnswer:
                          \nb) Compiler<\/p>\n

                          \"Samacheer<\/p>\n

                          Question 186.
                          \nIf there are no errors in the source code, …………… translates the source code into a machine-readable object file.
                          \na) Interpreter
                          \nb) Compiler
                          \nc) Loader
                          \nd) Assembler
                          \nAnswer:
                          \nb) Compiler<\/p>\n

                          Question 187.
                          \nThe compiler translates the source code into machine-readable object file with an extension…………..
                          \na) .cpp
                          \nb) .exe
                          \nc) .obj *
                          \nd) None of these
                          \nAnswer:
                          \nc) .obj *<\/p>\n

                          Question 188.
                          \nThe object file becomes an executable file with extension ……………
                          \na) .cpp
                          \nb) .exe
                          \nc) .obj
                          \nd) None of these
                          \nAnswer:
                          \nb) .exe<\/p>\n

                          \"Samacheer<\/p>\n

                          Question 189.
                          \n………….. files can run without the help of any compiler or IDE.
                          \na) Source
                          \nb) Object
                          \nc) Executable
                          \nd) None of these
                          \nAnswer:
                          \nc) Executable<\/p>\n

                          Question 190.
                          \n…………… makes it easy to create, compile and execute a C++ program.
                          \na) Editors
                          \nb) IDE
                          \nc) Compilers
                          \nd) None of these
                          \nAnswer:
                          \nb) IDE<\/p>\n

                          Question 191.
                          \nIDE stands for …………….
                          \na) Integrated Development Environment
                          \nb) Integrated Design Environment
                          \nc) Instant Development Environment
                          \nd) Integral Development Environment
                          \nAnswer:
                          \na) Integrated Development Environment<\/p>\n

                          \"Samacheer<\/p>\n

                          Question 192.
                          \n……………. is open-source C++ compiler.
                          \na) Dev C++ \/ Geany \/ Sky IDE
                          \nb) Code Lite \/ Code::blocks \/ Eclipse
                          \nc) Ner Beans \/ Digital Mars
                          \nd) All the above
                          \nAnswer:
                          \nd) All the above<\/p>\n

                          Question 193.
                          \nDev C++ is written in …………
                          \na) Delphi
                          \nb) C++
                          \nc) C
                          \nd) Pascal
                          \nAnswer:
                          \na) Delphi<\/p>\n

                          Question 194.
                          \n………….. error is possible in C++.
                          \na) Syntax
                          \nb) Semantic
                          \nc) Run-time
                          \nd) All the above
                          \nAnswer:
                          \nd) All the above<\/p>\n

                          \"Samacheer<\/p>\n

                          Question 195.
                          \n………….. error occurs because of some illegal operation that takes place.
                          \na) Syntax
                          \nb) Semantic
                          \nc) Run-time
                          \nd) All the above
                          \nAnswer:
                          \nc) Run-time<\/p>\n

                          Question 196.
                          \nSemantic error is called as ……………error.
                          \na) Syntax
                          \nb) Logic
                          \nc) Run-time
                          \nd) All the above
                          \nAnswer:
                          \nb) Logic<\/p>\n

                          Question 197.
                          \nIf a program tries to open a file which does not exist, it results in a …………. error.
                          \na) Syntax
                          \nb) Logic
                          \nc) Run-time
                          \nd) All the above
                          \nAnswer:
                          \nc) Run-time<\/p>\n

                          Question 198.
                          \n……………. errors occur when grammatical rules of C++are violated.
                          \na) Syntax
                          \nb) Logic
                          \nc) Run-time
                          \nd) All the above
                          \nAnswer:
                          \na) Syntax<\/p>\n

                          \"Samacheer<\/p>\n

                          Very Short Answers (2 Marks)<\/span><\/p>\n

                          Question 1.
                          \nMention any two benefits of C++.
                          \nAnswer:<\/p>\n

                            \n
                          1. C++ is a highly portable language and is often the language of choice for multi-device, multi-platform app development.<\/li>\n
                          2. C++ is an object-oriented programming language and includes classes, inheritance, polymorphism, data abstraction, and encapsulation.<\/li>\n<\/ol>\n

                            Question 2.
                            \nWhat is a character?
                            \nAnswer:
                            \nA character represents any alphabet, number, or any other symbol (special characters) mostly available in the keyboard.<\/p>\n

                            Question 3.
                            \nWhat are the types of C++ operators based on the number of operands?
                            \nAnswer:
                            \nThe types of C++ operators based on the number of operands are:<\/p>\n

                              \n
                            1. Unary Operators – Require only one operand<\/li>\n
                            2. Binary Operators – Require two operands<\/li>\n
                            3. Ternary Operators – Require three operands<\/li>\n<\/ol>\n

                              \"Samacheer<\/p>\n

                              Question 4.
                              \nWhat are the recent keywords included in C++?
                              \nAnswer:
                              \nThe recent list of keywords includes: using, namespace, bal, static_cast, const_cast, dynamic_cast, true, false.<\/p>\n

                              Question 5.
                              \nWhat is a stream extraction operator?
                              \nAnswer:
                              \nC++ provides the operator >> to get input. It extracts the value through the keyboard and assigns it to the variable on its right; hence, it is called as \u201cStream extraction\u201d or \u201cget from\u201d operator.<\/p>\n

                              Question 6.
                              \nWhy the following identifiers are invalid?
                              \na) num-add
                              \nb) this
                              \nc) 2myfile
                              \nAnswer:
                              \na) num-add – It contains spedal character (-) which \u00a1s not permitted
                              \nb) this – It is a keyword in C++. Keyword can not be used as identifier
                              \nc) 2myflle – Name must begin with an alphabet or an underscore.<\/p>\n

                              \"Samacheer<\/p>\n

                              Question 7.
                              \nWhat are the main types of C++ datatypes?
                              \nAnswer:
                              \nIn C++, the data types are classified into three main categories<\/p>\n

                                \n
                              1. Fundamental data types<\/li>\n
                              2. User-defined data types<\/li>\n
                              3. Derived data types.<\/li>\n<\/ol>\n

                                Question 8.
                                \nWhat are Boolean literals?
                                \nAnswer:
                                \nBoolean literals are used to represent one of the Boolean values (True or false). Internally true has value 1 and false has value 0.<\/p>\n

                                Question 9.
                                \nWhat are string literals?
                                \nAnswer:
                                \nThe sequence of characters enclosed within double quotes is called String literals. By default, string literals are automatically added with a special character ‘\\0’ (Null) at the end. Valid string Literals: “A” “Welcome” “1234” Invalid String Literals : ‘Welcome’,’1234′<\/p>\n

                                \"Samacheer<\/p>\n

                                Question 10.
                                \nDifferentiate Operators and Operands.
                                \nAnswer:
                                \nThe symbols which are used to do some mathematical or logical operations are called as Operators.
                                \nThe data items or values that the operators act upon are called as Operands.<\/p>\n

                                Question 11.
                                \nWhat are the classifications of C++ operators based on operand requirements?
                                \nAnswer:
                                \nIn C++, the operators are classified on the basis of the number of operands as follows:
                                \ni) Unary Operators – Require only one operand
                                \nii) Binary Operators – Require two operands
                                \niii) Ternary Operators – Require three operands<\/p>\n

                                Question 12.
                                \nList the C++ operators.
                                \nAnswer:
                                \nC++ Operators are classified as:<\/p>\n

                                  \n
                                • Arithmetic Operators<\/li>\n
                                • Relational Operators<\/li>\n
                                • Logical Operators<\/li>\n
                                • Bitwise Operators<\/li>\n
                                • Assignment Operators<\/li>\n
                                • Conditional Operator<\/li>\n
                                • Other Operators ,<\/li>\n<\/ul>\n

                                  \"Samacheer<\/p>\n

                                  Question 13.
                                  \nWrite note on increment and decrement operators.
                                  \nAnswer:
                                  \n++ (Plus, Plus) Increment operator
                                  \n– (Minus, Minus) Decrement operator
                                  \nAn increment or decrement operator acts upon a single operand and returns a new value. Thus, these operators are unary operators. The increment operator adds 1 to its operand and the decrement operator subtracts 1 from its operand.
                                  \nExample:
                                  \nx++ is the same as x = x+1; It adds 1 to the present value of x.
                                  \nX– is the same as x = x\u20141; It subtracts 1 from the present value of x.<\/p>\n

                                  Question 14.
                                  \nWrite a note on bitwise operators.
                                  \nAnswer:
                                  \nBitwise operators work on each bit of data and perform the bit-by-bit operation.
                                  \nIn C++, there are three kinds of bitwise operators, which are:<\/p>\n

                                    \n
                                  • Logical bitwise operators<\/li>\n
                                  • Bitwise shift operators<\/li>\n
                                  • One’s compliment operator<\/li>\n<\/ul>\n

                                    Question 15.
                                    \nWrite about bitwise one’s compliment operator.
                                    \nAnswer:
                                    \nThe Bitwise one’s compliment operator:
                                    \nThe bitwise One’s compliment operator ~(Tilde), inverts all the bits in a binary pattern, that is, all l’s become 0 and all 0’s become 1. This is a unary operator.
                                    \nExample:
                                    \nIf a = 15; Equivalent binary values of a is 0000 1111
                                    \n\"Samacheer<\/p>\n

                                    \"Samacheer<\/p>\n

                                    Question 16.
                                    \nWrite about assignment operator.
                                    \nAnswer:
                                    \nAssignment Operator:
                                    \nThe assignment operator is used to assigning a value to a variable which is on the left-hand side of an assignment statement. = (equal to) is commonly used as the assignment operator in all computer programming languages. This operator copies the value at the right side of the operator to the left side variable. It is also a binary operator.
                                    \n\"Samacheer<\/p>\n

                                    Question 17.
                                    \nWhat are the shorthand assignment operators? Give example.
                                    \nAnswer:<\/p>\n\n\n\n\n\n\n\n\n
                                    \n

                                    Operator<\/p>\n<\/td>\n

                                    \u00a0 \u00a0 \u00a0 Name of\u00a0 Operator\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0Example<\/td>\n<\/tr>\n
                                    +=<\/td>\nAddition Assignment<\/td>\na = 10;
                                    \nc = a+= 5;
                                    \n(ie, a = a+5)
                                    \nc = 15<\/td>\n<\/tr>\n
                                    -=<\/td>\nSubtraction Assignment<\/td>\na = 10;
                                    \nc = a-= 5;
                                    \n(ie, a = a-5)
                                    \nc = 5<\/td>\n<\/tr>\n
                                    * =<\/td>\nMultiplication Assignment<\/td>\na = 10;
                                    \nc = a*= 5;
                                    \n(ie, a = a*5)
                                    \nc = 50<\/td>\n<\/tr>\n
                                    \/=<\/td>\nDivision Assignment<\/td>\na = 10;
                                    \nc – a\/= 5;
                                    \n(ie, a = a\/5)
                                    \nc = 2<\/td>\n<\/tr>\n
                                    %=<\/td>\nModulus Assignment<\/td>\na = 10;
                                    \nc = a%= 5;
                                    \n(ie, a = a%5)
                                    \nc = 0<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n

                                    \"Samacheer<\/p>\n

                                    Question 18.
                                    \nWrite note on conditional or ternary operator.
                                    \nAnswer:
                                    \nIn C++, there is only one conditional operator is used. ?: is a conditional Operator. This is a Ternary Operator. This operator is used as an alternative to if… else control statement.<\/p>\n

                                    Question 19.
                                    \nWrite note on comma (, ) operator.
                                    \nAnswer:
                                    \nThe comma (,) is an operator in C++ used to bring together several expressions. The group of expressions separated by a comma is evaluated from left to right.<\/p>\n

                                    Question 20.
                                    \nWhat are the pointer operators?
                                    \nAnswer:
                                    \n* – Pointer to a variable operator
                                    \n& – Address of operator<\/p>\n

                                    Question 21.
                                    \nWhat are the component selection operators?
                                    \nAnswer:
                                    \n. – Direct component selector operator
                                    \n-> – Indirect component selector operator<\/p>\n

                                    \"Samacheer<\/p>\n

                                    Question 22.
                                    \nWhat are the class member operators?
                                    \nAnswer:
                                    \n:: – Scope access \/ resolution operator
                                    \n.* – Dereference operator
                                    \n->* – Dereference pointer to class member operator<\/p>\n

                                    Question 23.
                                    \nWhat is operator association?
                                    \nAnswer:
                                    \nThe operands and the operators are grouped in a specific logical way for evaluation. This logical grouping is called as an Association.<\/p>\n

                                    Question 24.
                                    \nWhat are the cascading operators?
                                    \nAnswer:
                                    \nGet from (>>) and Put to (<<) operators are cascading operators.<\/p>\n

                                    Question 25.
                                    \nWhat are the popular C++ Compilers with IDE.
                                    \nAnswer:<\/p>\n\n\n\n\n\n\n\n\n\n\n\n
                                    \n

                                    Compiler<\/p>\n<\/td>\n

                                    \n

                                    Availability<\/p>\n<\/td>\n<\/tr>\n

                                    Dev C++<\/td>\nOpen-source<\/td>\n<\/tr>\n
                                    Geany<\/td>\nOpen-source<\/td>\n<\/tr>\n
                                    Code:: blocks<\/td>\nOpen source<\/td>\n<\/tr>\n
                                    Code Lite<\/td>\nOpen-source<\/td>\n<\/tr>\n
                                    Net Beans<\/td>\nOpen-source<\/td>\n<\/tr>\n
                                    Digital Mars<\/td>\nOpen-source<\/td>\n<\/tr>\n
                                    Sky IDE<\/td>\nOpen-source<\/td>\n<\/tr>\n
                                    Eclipse<\/td>\nOpen-source<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n

                                    \"Samacheer<\/p>\n

                                    Short Answers (3 Marks)<\/span><\/p>\n

                                    Question 1.
                                    \nWhat are the benefits of C++?
                                    \nAnswer:
                                    \nBenefits of learning C++:<\/p>\n

                                      \n
                                    • c++ \u00a1s a highly portable language and \u00a1s often the language of choice for multi-device, multi- platform app development.<\/li>\n
                                    • C++ is an object-oriented programming language and includes classes, inheritance, polymorphism, data abstraction and encapsulation.<\/li>\n
                                    • C++ has a rich function library.<\/li>\n
                                    • C++ allows exception handling, inheritance and function overloading which are not possible in C.<\/li>\n
                                    • C++ is a powerful, efficient and fast language.<\/li>\n<\/ul>\n

                                      It finds a wide range of applications \u2014 from GUI applications to 3D graphics for games to real-time mathematical simulations.<\/p>\n

                                      Question 2.
                                      \nWhat are the characters used In C++?
                                      \nAnswer:
                                      \nC++ accepts the following characters:<\/p>\n\n\n\n\n\n\n\n
                                      Alphabets<\/td>\nA …. Z, a…. z<\/td>\n<\/tr>\n
                                      Numeric<\/td>\n0 …. 9<\/td>\n<\/tr>\n
                                      Special Characters<\/td>\n+ – * \/ ~ ! @ # $ % A<\/sup>& [ ] ( ) {} = ><_\\l?.,:'”;<\/td>\n<\/tr>\n
                                      White space<\/td>\nBlank space, Horizontal tab (->), Carriage return (), Newline, Form feed<\/td>\n<\/tr>\n
                                      Other characters<\/td>\nC++ can process any of the 256 ASCII characters as data.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n

                                      Question 3.
                                      \nWhat are Automatic conversion and Type promotion?
                                      \nAnswer:
                                      \nImplicit type conversion is a conversion performed by the compiler automatically. So, the implicit conversion is also called \u201cAutomatic conversion\u201d. This type of conversion is applied usually whenever different data types are intermixed in an expression. If the type of the operands differs, the compiler converts one of them to match with the other, using the rule that the \u201csmaller\u201d type is converted to the \u201cwider\u201d type, which is called \u201cType Promotion\u201d.<\/p>\n

                                      \"Samacheer<\/p>\n

                                      Question 4.
                                      \nWhat are the rules for naming an identifier\/variable?
                                      \nAnswer:
                                      \nRules for naming an identifier:<\/p>\n

                                        \n
                                      • The first character of an identifier must be an alphabet or an underscore (-).<\/li>\n
                                      • Only alphabets, digits, and underscore are permitted. Other special characters are not allowed as part of an identifier.<\/li>\n
                                      • c++ is case sensitive as it treats upper and lower-case characters differently.<\/li>\n
                                      • Reserved words or keywords cannot be used as an identifier name.<\/li>\n<\/ul>\n

                                        Question 5.
                                        \nList the kinds of literals in C++.
                                        \nAnswer:
                                        \nC++ has several kinds of literals. They are:
                                        \n\"Samacheer<\/p>\n

                                        Question 6.
                                        \nWhat are the types of C++operators?
                                        \nAnswer:
                                        \nC++ Operators are classified as:<\/p>\n

                                          \n
                                        1. Arithmetic Operators<\/li>\n
                                        2. Relational Operators<\/li>\n
                                        3. Logical Operators<\/li>\n
                                        4. Bitwise Operators<\/li>\n
                                        5. Assignment Operators<\/li>\n
                                        6. Conditional Operator<\/li>\n
                                        7. Other Operators<\/li>\n<\/ol>\n

                                          \"Samacheer<\/p>\n

                                          Question 7.
                                          \nWrite a note on character constants.
                                          \nAnswer:
                                          \nA character constant is any valid single character enclosed within single quotes. A character constant in C++ must contain one character and must be enclosed within a single quote.
                                          \nValid character constants : ‘A’, ‘2\\ ‘$’
                                          \nInvalid character constants : “A”
                                          \nThe value of a single character constant has an equivalent ASCII value. For example, the value of’A’ is 65.<\/p>\n

                                          Question 8.
                                          \nWhat are escape sequences? Explain.
                                          \nAnswer:
                                          \nEscape sequences (or) Non-graphic characters:
                                          \nC++ allows certain non-printable characters represented as character constants. Non-printable characters are also called non-graphical characters. Non-printable characters are those characters that cannot be typed directly from a keyboard during the execution of a program in C++.
                                          \nFor example: backspace, tabs etc. These non-printable characters can be represented by using escape sequences. An escape sequence is represented by a backslash followed by one or two characters.
                                          \nExample: \\t \\On \\xHn<\/p>\n

                                          Question 9.
                                          \nTabulate the escape sequence characters.
                                          \nAnswer:<\/p>\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
                                          \n

                                          Escape sequence<\/p>\n<\/td>\n

                                          \n

                                          Non-graphical character<\/p>\n<\/td>\n<\/tr>\n

                                          \\a<\/td>\nAudible or alert bell<\/td>\n<\/tr>\n
                                          \\b<\/td>\nBackspace<\/td>\n<\/tr>\n
                                          \\f<\/td>\nForm feed<\/td>\n<\/tr>\n
                                          \\n<\/td>\nNewline or linefeed<\/td>\n<\/tr>\n
                                          \\r<\/td>\nCarriage return<\/td>\n<\/tr>\n
                                          \\t<\/td>\nHorizontal tab<\/td>\n<\/tr>\n
                                          \\v<\/td>\nVertical tab<\/td>\n<\/tr>\n
                                          \\\\<\/td>\nBackslash<\/td>\n<\/tr>\n
                                          \\’<\/td>\nSingle quote<\/td>\n<\/tr>\n
                                          \\”<\/td>\nDouble quote<\/td>\n<\/tr>\n
                                          \\?<\/td>\nQuestion Mark<\/td>\n<\/tr>\n
                                          \\On<\/td>\nOctal number<\/td>\n<\/tr>\n
                                          \\xHn<\/td>\nHexadecimal number<\/td>\n<\/tr>\n
                                          \\o<\/td>\nNull<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n

                                          \"Samacheer<\/p>\n

                                          Question 10.
                                          \nWrite a note on arithmetic operators.
                                          \nAnswer:
                                          \nArithmetic operators perform simple arithmetic operations like addition, subtraction, multiplication, division etc.<\/p>\n\n\n\n\n\n\n\n\n
                                          \n

                                          Operator<\/p>\n<\/td>\n

                                          \n

                                          Operation<\/p>\n<\/td>\n

                                          \n

                                          Example<\/p>\n<\/td>\n<\/tr>\n

                                          +<\/td>\nAddition<\/td>\n10 + 5 = 15<\/td>\n<\/tr>\n
                                          –<\/td>\nSubtraction<\/td>\n10 – 5 = 5<\/td>\n<\/tr>\n
                                          *<\/td>\nMultiplication<\/td>\n10 * 5 = 50<\/td>\n<\/tr>\n
                                          \/<\/td>\nDivision<\/td>\n10 \/ 5 = 2 (Quotient of the division)<\/td>\n<\/tr>\n
                                          %<\/td>\nModulus (To find the reminder of a division)<\/td>\n10 % 3 = 1 (Remainder of the division)<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n

                                          Question 11.
                                          \nWhat are the relational operators in C++? Give examples.
                                          \nAnswer:
                                          \nRelational operators are used to determining the relationship between its operands. When the relational operators are applied on two operands, the result will be a Boolean value i.e 1 or 0 to represents True or False respectively. C++ provides six relational operators. They are:<\/p>\n\n\n\n\n\n\n\n\n\n
                                          Operator<\/td>\nOperation<\/td>\nExample<\/td>\n<\/tr>\n
                                          ><\/td>\nGreater than<\/td>\na > b<\/td>\n<\/tr>\n
                                          <<\/td>\nLess than<\/td>\na < b<\/td>\n<\/tr>\n
                                          >=<\/td>\nGreater than or equal to<\/td>\na >= b<\/td>\n<\/tr>\n
                                          <=<\/td>\nLess than or equal to<\/td>\na <= b<\/td>\n<\/tr>\n
                                          ==<\/td>\nEqual to<\/td>\na == b<\/td>\n<\/tr>\n
                                          j=<\/td>\nNot equal<\/td>\na != b<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n
                                            \n
                                          • In the above examples, the operand ‘a’ is compared with ‘b’ and depending on the relation, the result will be either 1 or 0. i.e., 1 for true, 0 for false.<\/li>\n
                                          • All six relational operators are binary operators.<\/li>\n<\/ul>\n

                                            \"Samacheer<\/p>\n

                                            Question 12.
                                            \nWhat are the logical operators used in C++? Explain its operation.
                                            \nAnswer:
                                            \nA logical operator is used to evaluate logical and relational expressions. The logical operators act upon the operands that are themselves called as logical expressions. C++ provides three logical operators.
                                            \ntable<\/p>\n\n\n\n\n\n\n
                                            \n

                                            Operator<\/p>\n<\/td>\n

                                            \n

                                            Operation<\/p>\n<\/td>\n

                                            \n

                                            Description<\/p>\n<\/td>\n<\/tr>\n

                                            &&<\/td>\nAND<\/td>\nThe logical AND combines two different relational expressions into one. It returns 1 (True), if both expressions are true, otherwise, it returns 0 (False).<\/td>\n<\/tr>\n
                                            II<\/td>\nOR<\/td>\nThe logical OR combines two different relational expressions into one. It returns 1 (True) if either one of the expressions is true. It returns 0 (False) if both the expressions are false.<\/td>\n<\/tr>\n
                                            !<\/td>\nNOT<\/td>\nNOT works on a single expression\/operand. It simply negates or inverts the truth value, i.e., if an operand\/expression is 1 (True) then this operator returns 0 (False) and vice versa.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n

                                            AND, OR both are binary operators where as NOT is a unary operator.
                                            \nExample:
                                            \na = 5, b = 6, c = 7;<\/p>\n\n\n\n\n\n\n\n
                                            \n

                                            Expression<\/p>\n<\/td>\n

                                            \n

                                            Result<\/p>\n<\/td>\n<\/tr>\n

                                            (a<b) && (b<c)<\/td>\n1 (True)<\/td>\n<\/tr>\n
                                            (a>b) && (b<c)<\/td>\n0 (False)<\/td>\n<\/tr>\n
                                            (a<b) || (b>c)<\/td>\n1 (True)<\/td>\n<\/tr>\n
                                            !(a>b)<\/td>\n1 (True)<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n

                                            Question 13.
                                            \nWhat are the logical bitwise operators? Explain its operation.
                                            \nAnswer:
                                            \nLogical bitwise operators:<\/p>\n

                                              \n
                                            • & Bitwise AND (Binary AND)<\/li>\n
                                            • | Bitwise OR (Binary OR)<\/li>\n
                                            • \u2227 Bitwise Exclusive OR (Binary XOR)<\/li>\n
                                            • Bitwise AND (&) will return 1 (True)if both the operands are having the value 1 (True); Otherwise, it will return 0 (False).<\/li>\n
                                            • Bitwise OR (|) will return 1 (True) if any one of the operands is having a value 1 (True); It returns 0 (False) if both the operands are having the value 0 (False).<\/li>\n
                                            • Bitwise XOR(A) will return 1 (True) if only one of the operand is having a value of 1 (True). If both are True or both are False, it will return 0 (False).<\/li>\n<\/ul>\n

                                              The truth table for bitwise operators (AND, OR, XOR)<\/p>\n\n\n\n\n\n\n\n
                                              A<\/td>\nB<\/td>\nA & B<\/td>\nA | B<\/td>\nA \u2227 B<\/td>\n<\/tr>\n
                                              1<\/td>\n1<\/td>\n1<\/td>\n1<\/td>\n0<\/td>\n<\/tr>\n
                                              1<\/td>\n0<\/td>\n0<\/td>\n1<\/td>\n1<\/td>\n<\/tr>\n
                                              0<\/td>\n1<\/td>\n0<\/td>\n1<\/td>\n1<\/td>\n<\/tr>\n
                                              0<\/td>\n0<\/td>\n0<\/td>\n0<\/td>\n0<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n

                                              Example:
                                              \nIf a = 65, b=15
                                              \nEquivalent binary values of 65 = 0100 0001; 15 = 0000 1111
                                              \n\"Samacheer<\/p>\n

                                              \"Samacheer<\/p>\n

                                              Question 14.
                                              \nWhat are the bitwise shift operators? Explain its operation.
                                              \nAnswer:
                                              \nThe Bitwise shift operators:
                                              \nThere are two bitwise shift operators in C++, Shift left (<<) and Shift right (>>).<\/p>\n

                                                \n
                                              1. Shift left (<<) – The value of the left operand is moved to the left by the number of bits specified by the right operand. The right operand should be an unsigned integer.<\/li>\n
                                              2. Shift right (>>) – The value of the left operand is moved to the right by the number of bits specified by the right operand. The right operand should be an unsigned integer.<\/li>\n<\/ol>\n

                                                Example:
                                                \nIf a =15; the Equivalent binary value of a is 0000 1111
                                                \n\"Samacheer<\/p>\n

                                                Question 15.
                                                \nWhat is input operator in C++? Explain.
                                                \nAnswer:
                                                \nC++ provides the operator >> to get input. It extracts the value through the keyboard and
                                                \nassigns it to the variable on its right; hence, it is called as “Stream extraction” or “get from” operator.
                                                \nIt is a binary operator i.e., it requires two operands. The first operand is the pre-defined identifier cin that identifies keyboard as the input device. The second operand must be a variable.
                                                \nWorking process of cin
                                                \n\"Samacheer
                                                \nExample:
                                                \ncin>>num; \u2014 Extracts num value
                                                \ncin>>x>>y; \u2014 Extracts x and y values<\/p>\n

                                                Question 16.
                                                \nWhat is an output operator in C++? Explain.
                                                \nAnswer:
                                                \nC+ + provides << operator to perform output operation. The operator << is called the \u201cStream insertion\u201d or \u201cput to\u201d operator. It is used to send the strings or values of the variables on its right to the object on its left. << is a binary operator.
                                                \nThe first operand is the pre-defined identifier cout that identifies monitor as the standard output object. The second operand may be a
                                                \nconstant, variable or an expression.
                                                \nWorking process of cout
                                                \n\"Samacheer
                                                \nExample:
                                                \ncout<<“Welcome”; – Display Welcome on-screen cout<<“The Sum =”<<\/p>\n

                                                \"Samacheer<\/p>\n

                                                Explain in Detail 5 Marks<\/span><\/p>\n

                                                Question 1.
                                                \nExplain Integer Constants. (or) Fixed point constants In detail.
                                                \nAnswer:
                                                \nIntegers are whole numbers without any fractions. An integer constant must have at least one digit without a decimal point. It may be signed or unsigned. Signed integers are considered as negative, commas and blank spaces are not allowed as part of it.
                                                \nIn C++, there are three types of integer constants:<\/p>\n

                                                  \n
                                                • Decimal<\/li>\n
                                                • Octal<\/li>\n
                                                • Hexadecimal<\/li>\n<\/ul>\n

                                                  i) Decimal
                                                  \nAny sequence of one or more digits (0 …. 9).<\/p>\n\n\n\n\n\n\n
                                                  \n

                                                  Valid<\/p>\n<\/td>\n

                                                  \n

                                                  Invalid<\/p>\n<\/td>\n<\/tr>\n

                                                  725<\/td>\n7,500 (Comma is not allowed)<\/td>\n<\/tr>\n
                                                  -27<\/td>\n66 5 (Blank space is not allowed)<\/td>\n<\/tr>\n
                                                  4.56<\/td>\n9$ (Special Character not allowed)<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n

                                                  If we assign 4.56 as an integer decimal constant, the compiler will accept only the integer portion of 4.56 ie. 4. It will simply ignore .56.<\/p>\n

                                                  ii) Octal:
                                                  \nAny sequence of one or more octal values (0 ….7) that begins with 0 is considered as an Octal constant.<\/p>\n\n\n\n\n\n\n
                                                  \n

                                                  Valid<\/p>\n<\/td>\n

                                                  \n

                                                  Invalid<\/p>\n<\/td>\n<\/tr>\n

                                                  012<\/td>\n05,600 (Comma is not allowed)<\/td>\n<\/tr>\n
                                                  -027<\/td>\n04.56 (A decimal point is not allowed)**<\/td>\n<\/tr>\n
                                                  +0231<\/td>\n0158 (8 is not a permissible digit in the octal system)<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n

                                                  iii) Hexadecimal:
                                                  \nAny sequence of one or more Hexadecimal values (0 …. 9, A …. F) that starts with Ox or OX is considered as a Hexadecimal constant.<\/p>\n\n\n\n\n\n
                                                  \n

                                                  Valid<\/p>\n<\/td>\n

                                                  \n

                                                  Invalid<\/p>\n<\/td>\n<\/tr>\n

                                                  0x123<\/td>\n0x1,A5 (Comma is not allowed)<\/td>\n<\/tr>\n
                                                  0X568<\/td>\n0x.l4E (Decimal point is not allowed like this)<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n

                                                  \"Samacheer<\/p>\n

                                                  Question 2.
                                                  \nExplain Real Constants. (or) Floating-point constants in detail.
                                                  \nAnswer:
                                                  \nReal Constants (or) Floating-point constants:
                                                  \nA real or floating-point constant is a numeric constant having a fractional component. These constants may be written \u00a1n fractional form or \u00a1n exponent form.
                                                  \nThe fractional form of a real constant is a signed or unsigned sequence of digits including a decimal point between the digits.
                                                  \nIt must have at least one digit before and after a decimal point. It may have a prefix with the + or – sign.
                                                  \nA real constant without any sign will be considered positive.
                                                  \nExponent form of real constants consists of two parts:<\/p>\n

                                                    \n
                                                  1. Mantissa<\/li>\n
                                                  2. Exponent<\/li>\n<\/ol>\n

                                                    The mantissa must be either an integer or a real constant. The mantissa followed by a letter E or e and the exponent. The exponent should also be an integer.
                                                    \nFor Example:
                                                    \n58000000.00 may be written as 0.58 x 108<\/sup> or 0. 58E8.<\/p>\n\n\n\n\n
                                                    \n

                                                    Mantissa (Before E)<\/p>\n<\/td>\n

                                                    \n

                                                    Exponent (After E)<\/p>\n<\/td>\n<\/tr>\n

                                                    0.58<\/td>\n8<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n

                                                    Example:
                                                    \n5.864 E1 \u2192 5.864 x 101<\/sup> \u2192 58.64
                                                    \n5864 E-2 \u2192 5864 x 10-2<\/sup> \u2192 58.64
                                                    \n0.5864 E2 \u2192 0.5864 x 102<\/sup> \u2192 58.64<\/p>\n

                                                    Question 3.
                                                    \nExplain the prefix and postfix operators’ working process with suitable examples.
                                                    \nAnswer:
                                                    \nThe ++ or – operators can be placed either as prefix (before) or as postfix (after) to a variable. With the prefix version, C++ performs the increment \/ decrement before using the operand.
                                                    \nFor example: N1=10, N2=20;
                                                    \nS = ++N1 + ++N2;
                                                    \nThe following Figure explains the working process of the above statement.
                                                    \n\"Samacheer
                                                    \nIn the above example, the value of num is first incremented by 1, then the incremented value is assigned to the respective operand.
                                                    \nWith the postfix version, C++ uses the value of the operand in evaluating the expression before incrementing \/decrementing its present value.
                                                    \nFor example: N1=10, N2=20;
                                                    \nS = N1++ + ++N2;
                                                    \nThe following Figure explains the working process of the above statement.
                                                    \n\"Samacheer
                                                    \nIn the above example, the value assigned to operand N1 is taken into consideration, first and then the value will be incremented by 1.<\/p>\n

                                                    \"Samacheer<\/p>\n

                                                    Question 4.
                                                    \nWhat are punctuators\/separators? List the punctuators and their operations.
                                                    \nAnswer:
                                                    \nPunctuators are symbols, which are used as delimiters while constructing a C++ program. They are also called “Separators”. The following punctuators are used in C++.<\/p>\n\n\n\n\n\n\n\n\n\n
                                                    Curly braces { }<\/td>\nOpening and closing curly braces indicate the start and the end of a block of code. A block of code containing more than one executable statement. These statements together are called as “compound statement”.<\/td>\nint main ()
                                                    \n{int x=10,
                                                    \ny=20, sum;
                                                    \nsum = x + y;
                                                    \ncout << sum;
                                                    \n}<\/td>\n<\/tr>\n
                                                    Parenthesis ()<\/td>\nOpening and closing parenthesis indicate function calls and function parameters.<\/td>\nclrscr();
                                                    \nadd (5, 6);<\/td>\n<\/tr>\n
                                                    Square brackets [ ]<\/td>\nIt indicates single and multidimensional arrays.<\/td>\nint num[5];
                                                    \ncharname[50];<\/td>\n<\/tr>\n
                                                    Comma (,)<\/td>\nIt is used as a separator in an expression.<\/td>\nint x=10, y=20, sum;<\/td>\n<\/tr>\n
                                                    Semicolon ;<\/td>\nEvery executable statement in C++ should terminate with a semicolon.<\/td>\nint main ()<\/p>\n

                                                    {
                                                    \nint x=10, y=20, sum; sum = x + y; cout << sum; }<\/td>\n<\/tr>\n

                                                    Colon :<\/td>\nIt is used to label a statement.<\/td>\nprivate:<\/td>\n<\/tr>\n
                                                    Comments
                                                    \n\/\/\/* *1<\/td>\n
                                                    Any statement that begins with \/\/ are considered a comments. Comments are simply ignored by compilers, i.e., compiler does not execute any statement that begins
                                                    \nwith a \/\/ \/\/ Single line comment
                                                    \n\/*\u00a0 ………….. \/\u00a0 Multiline comment<\/td>\n
                                                    \/* This is written By
                                                    \nmyself to learn CPP *\/ int main ()
                                                    \n{
                                                    \nintx=10,
                                                    \ny=20, sum;\u00a0 \/\/ to sum x\u00a0\u00a0and y\u00a0\u00a0sum = x + y;
                                                    \ncout << sum;
                                                    \n}<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n

                                                    \"Samacheer<\/p>\n

                                                    Evaluate Yourself<\/span><\/p>\n

                                                    Question 1.
                                                    \nWhat is meant by literals? How many types of integer literals available in C++?
                                                    \nAnswer:
                                                    \nLiterals are data items whose values do not change during the execution of a program. Literals are called as Constants.
                                                    \nIn C++, there are three types of integer literals (constants). They are:<\/p>\n

                                                      \n
                                                    1. Decimal<\/li>\n
                                                    2. Octal<\/li>\n
                                                    3. Hexadecimal<\/li>\n<\/ol>\n

                                                      Question 2.
                                                      \nWhat kind of constants is following?
                                                      \ni) 26
                                                      \nii) 015
                                                      \niii) 0xF
                                                      \niv) 014.9
                                                      \nAnswer:
                                                      \ni) 26 : Decimal constant
                                                      \nii) 015 : Octal constant
                                                      \niii) 0xF : Hexadecimal constant
                                                      \niv) 014.9 : Integer Constant. (A fractional number that begins with 0, C++ has consider the number as an integer not an Octal)<\/p>\n

                                                      Question 3.
                                                      \nWhat is the character constant in C++?
                                                      \nAnswer:
                                                      \nA character constant is any valid single character enclosed within single quotes. A character constant in C++ must contain one character and must be enclosed within a single quote.
                                                      \nValid character constants: ‘A’, ‘2’, ‘$’
                                                      \nInvalid character constants: “A”<\/p>\n

                                                      \"Samacheer<\/p>\n

                                                      Question 4.
                                                      \nHow are non-graphic characters represented in C++?
                                                      \nAnswer:
                                                      \nNon-printable characters are also called as non-graphical characters.
                                                      \nNon-printable characters are those characters that cannot be typed directly from a keyboard during the execution of a program in C++, for example, backspace, tabs, etc. These non-printable characters can be represented by using escape sequences.<\/p>\n

                                                      An escape sequence is represented by a backslash followed by one or two characters.<\/p>\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
                                                      \n

                                                      Escape Sequence<\/p>\n<\/td>\n

                                                      \n

                                                      Non-graphical character<\/p>\n<\/td>\n<\/tr>\n

                                                      \\a<\/td>\nThe audible or alert bell<\/td>\n<\/tr>\n
                                                      \\b<\/td>\nBackspace<\/td>\n<\/tr>\n
                                                      \\f<\/td>\nForm feed<\/td>\n<\/tr>\n
                                                      \\n<\/td>\nNewline or linefeed<\/td>\n<\/tr>\n
                                                      \\r<\/td>\nCarriage return<\/td>\n<\/tr>\n
                                                      \\t<\/td>\nHorizontal tab<\/td>\n<\/tr>\n
                                                      \\v<\/td>\nVertical tab<\/td>\n<\/tr>\n
                                                      \\\\<\/td>\nBackslash<\/td>\n<\/tr>\n
                                                      V<\/td>\nSingle quote<\/td>\n<\/tr>\n
                                                      \\”<\/td>\nDouble quote<\/td>\n<\/tr>\n
                                                      \\On<\/td>\nOctal number<\/td>\n<\/tr>\n
                                                      \\xHn<\/td>\nHexadecimal number<\/td>\n<\/tr>\n
                                                      \\0<\/td>\nNull<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n

                                                      Even though an escape sequence contains two characters, they should be enclosed within single quotes because, C++ consider escape sequences as character constants and allocates one byte in ASCII representation.<\/p>\n

                                                      \"Samacheer<\/p>\n

                                                      Question 5.
                                                      \nWrite the following real constants into exponent form:
                                                      \ni) 32.179
                                                      \nii) 8.124
                                                      \niii) 0.00007
                                                      \nAnswer:
                                                      \ni) 32.179 \u2192 3.2179E1 (OR) 0.32179E2 (OR) 32178E-3
                                                      \nii) 8.124 \u2192 0.8124E1 (OR) 8124E-3
                                                      \niii) 0.00007 \u2192 7E-5<\/p>\n

                                                      Question 6.
                                                      \nWrite the following real constants into fractional form:
                                                      \ni) 0.23E4
                                                      \nii) 0.517E-3
                                                      \niii) 0.5E-5
                                                      \nAnswer:
                                                      \ni) 0.23E4 \u2192 2300
                                                      \nii) 0.517E-3 \u2192 0.000517
                                                      \niii) 0.5E-5 \u2192 0.000005<\/p>\n

                                                      Question 7.
                                                      \nWhat is the significance of the null (\\0) character in a string?
                                                      \nAnswer:
                                                      \nBy default, string literals are automatically added with a special character ‘\\0’ (Null) at the end. It is called as an end of string character.
                                                      \nThe string “welcome” will actually be represented as “welcome\\0” in memory and the size of this string is not 7 but 8 characters i.e., inclusive of the last character \\0.<\/p>\n

                                                      \"Samacheer<\/p>\n

                                                      Evaluate Yourself<\/span><\/p>\n

                                                      Question 1.
                                                      \nWhat is the use of operators?
                                                      \nAnswer:
                                                      \nOperators are the symbols which are used to do some mathematical or logical operations on their operands.<\/p>\n

                                                      Question 2.
                                                      \nWhat are binary operators? Give examples.
                                                      \nAnswer:
                                                      \nArithmetic binary operators.
                                                      \nBinary Operators – Require two operands.
                                                      \nThe arithmetic operators addition(+), subtraction(-), multiplication(*), division(\/) and Modulus(%) are binary operators which requires two operands.
                                                      \nExample:<\/p>\n\n\n\n\n\n\n\n\n
                                                      \n

                                                      Operator<\/p>\n<\/td>\n

                                                      \n

                                                      Operation<\/p>\n<\/td>\n

                                                      \n

                                                      Example<\/p>\n<\/td>\n<\/tr>\n

                                                      +<\/td>\nAddition<\/td>\n10 + 5 = 15<\/td>\n<\/tr>\n
                                                      –<\/td>\nSubtraction<\/td>\n10 – 5 = 5 Slfil.r<\/td>\n<\/tr>\n
                                                      *<\/td>\nMultiplication<\/td>\n10 * 5 = 50<\/td>\n<\/tr>\n
                                                      \/<\/td>\nDivision<\/td>\n10 \/ 5 = 2 (Quotient of the division)<\/td>\n<\/tr>\n
                                                      %<\/td>\nModulus (To find the reminder of a division)<\/td>\n10 % 3 = 1 (Remainder of the division)<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n

                                                      Question 3.
                                                      \nWhat does the modulus operator % do?
                                                      \nAnswer:
                                                      \nThe modulus operator is used to find the remainder of a division.
                                                      \nExample:
                                                      \n10%3 will return 1 which is the remainder of the division.<\/p>\n

                                                      \"Samacheer<\/p>\n

                                                      Question 4.
                                                      \nWhat will be the result of 8.5 % 2?
                                                      \nAnswer:
                                                      \nThe following error will appear while compiling the program.
                                                      \nInvalid operands of types ‘double’ and ‘int’ to binary ‘operator%’.
                                                      \nThe reason is % operator operates on integer operands only.<\/p>\n

                                                      Question 5.
                                                      \nAssume that R starts with a value of 35. What will be the value of S from the following expression? S=(R–)+(++R)
                                                      \nAnswer:
                                                      \nS = 70<\/p>\n

                                                      Question 6.
                                                      \nWhat will be the value of j = – – k + 2k. if k is ‘ 20 initially?
                                                      \nAnswer:
                                                      \nThe value of j will be 57 and k will be 19.
                                                      \nC++ Code;
                                                      \n#include
                                                      \nusing namespace std;
                                                      \nint main()
                                                      \n{
                                                      \nint k=20,j;
                                                      \nj=–k+2*k;
                                                      \ncout<< “Vlaue of j=”<<j<< “\\nVlaue of
                                                      \nk =”<<k;
                                                      \nreturn 0;
                                                      \n}
                                                      \nOut put
                                                      \n\"Samacheer<\/p>\n

                                                      \"Samacheer<\/p>\n

                                                      Question 7.
                                                      \nWhat will be the value of p = p * ++j where j is 22 and p = 3 initially?
                                                      \nAnswer:
                                                      \nThe value of p is 69 and j is 23.
                                                      \nC++ program:
                                                      \n#include
                                                      \nusing namespace std;
                                                      \nint main()
                                                      \n{
                                                      \nint j=22, p=3;
                                                      \nP = P * ++j;
                                                      \ncout<< “Value of p =”<<p<< “\\nValue of
                                                      \nj =”<<j;
                                                      \nreturn 0;
                                                      \n}
                                                      \nOut put
                                                      \n\"Samacheer<\/p>\n

                                                      Question 8.
                                                      \nGive that i = 8, j = 10, k = 8, What will be result of the following expressions?
                                                      \ni) i < k
                                                      \nii) i < j
                                                      \niii) i > = k
                                                      \niv) i = = j
                                                      \nv) j ! = k
                                                      \nAnswer:<\/p>\n\n\n\n\n\n\n\n\n
                                                      \n

                                                      Expression<\/p>\n<\/td>\n

                                                      \n

                                                      Result<\/p>\n<\/td>\n<\/tr>\n

                                                      i < k<\/td>\n0 (False)<\/td>\n<\/tr>\n
                                                      i < j<\/td>\n1 (True)<\/td>\n<\/tr>\n
                                                      i >= k<\/td>\n1 (True)<\/td>\n<\/tr>\n
                                                      i == j<\/td>\n0 (False)<\/td>\n<\/tr>\n
                                                      j != k<\/td>\n1 (True)<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n

                                                      \"Samacheer<\/p>\n

                                                      Question 9.
                                                      \nWhat will be the order of evaluation for the following expressions?
                                                      \ni) i + 3 > = j – 9
                                                      \nii) a +10 < p – 3 + 2 q
                                                      \nAnswer:
                                                      \n\"Samacheer<\/p>\n

                                                      Question 10.
                                                      \nWrite an expression involving a logical operator to test, if marks are 75 and grade is ‘A’.
                                                      \nAnswer:
                                                      \n(marks == 75) && (grade == ‘A)<\/p>\n

                                                      Hands On Practice<\/span><\/p>\n

                                                      Type the following C++ Programs in Dev C++ IDE and execute, if the compiler shows any errors, try to rectify it and execute again and again till you get the expected result.
                                                      \nQuestion 1.
                                                      \nC++ Program to find the total marks of three
                                                      \nsubjects.
                                                      \n#include
                                                      \nusing namespace std;
                                                      \nint main()
                                                      \n{
                                                      \nint m1, m2, m3, sum;
                                                      \ncout << “\\n Enter Mark 1:”; cin >> m1;
                                                      \ncout << \u201d\\n Enter Mark 2: “; cin >> m2;
                                                      \ncout << “\\n Enter Mark 3: “; cin >> m3;
                                                      \nsum = m1 + m2 + m3;
                                                      \ncout << “\\n The sum = ” << sum;
                                                      \n}
                                                      \nMake changes in the above code to get the average of all the given marks.
                                                      \nAnswer:
                                                      \nModified Program:
                                                      \n#include
                                                      \nusing namespace std;
                                                      \nint main()
                                                      \n{
                                                      \nint m1, m2, m3, sum;
                                                      \nfloat avg;
                                                      \ncout << “\\n Enter Mark 1: “;
                                                      \ncin >> m1;
                                                      \ncout << “\\n Enter Mark 2: “;
                                                      \ncin >> m2;
                                                      \ncout << “\\n Enter Mark 3: “;
                                                      \ncin >> m3;
                                                      \nsum = m1 + m2 + m3;
                                                      \navg = (float)sum \/ 3;
                                                      \ncout << “\\n The sum = ” << sum;
                                                      \ncout << “\\n The average = ” << avg;
                                                      \n}
                                                      \nOutput
                                                      \n\"Samacheer<\/p>\n

                                                      \"Samacheer<\/p>\n

                                                      Question 2.
                                                      \nC++ program to find the area of a circle.
                                                      \n#include
                                                      \nusing namespace std;
                                                      \nint main()
                                                      \n{
                                                      \nint radius;
                                                      \nfloat area;
                                                      \ncout << \u201c\\n Enter Radius: \u201c;
                                                      \ncin<< radius;
                                                      \narea = 3.14 * radius * radius;
                                                      \ncout << \u201c\\n The area of circle =\u201c <<area;
                                                      \n}
                                                      \nOutput
                                                      \n\"Samacheer<\/p>\n

                                                      Question 3.
                                                      \nPoint out the errors in the following program:
                                                      \nUsing namespace std;
                                                      \nint main( )
                                                      \n{
                                                      \ncout << “Enter a value”
                                                      \ncin << numl >> num2
                                                      \nnum+num2=sum;
                                                      \ncout >> “\\n The Sum= ” >> sum;
                                                      \nAnswer:<\/p>\n\n\n\n\n\n\n\n\n\n\n
                                                      \n

                                                      Given code<\/p>\n<\/td>\n

                                                      \n

                                                      Error<\/p>\n<\/td>\n<\/tr>\n

                                                      Using namespace std;<\/td>\nThe keyword must be in lowercase. So, Using should be written as using. Header file is missing.<\/td>\n<\/tr>\n
                                                      int main()<\/td>\nNo Error<\/td>\n<\/tr>\n
                                                      <\/td>\nNo Error<\/td>\n<\/tr>\n
                                                      cout << “Enter a value “;<\/td>\nPrompt should be “Enter two values” because cin contains two variables.<\/td>\n<\/tr>\n
                                                      cin << numl >> num2<\/td>\nVariables are not declared. It should be declared first, cin must followed by Extraction operator(>>).<\/p>\n

                                                      Semicolon is missing at the end of the statement.<\/td>\n<\/tr>\n

                                                      num+num2=sum;<\/td>\nImproper assignment statement and undefined variable name used. It should be replaced as sum=numl + num2;<\/td>\n<\/tr>\n
                                                      cout >> “\\n The Sum= ” >> sum;<\/td>\ncout must followed by put to the operator.
                                                      \nReturn 0; statement is missing. Close bracket} missing.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n

                                                      The correct program is given below:
                                                      \nusing namespace std;
                                                      \n#include
                                                      \nint main()
                                                      \n{
                                                      \nint num1,num2,sum;
                                                      \ncout << “Enter two values”; cin >> numl >> num2;
                                                      \nsum= num+num2;
                                                      \ncout << “\\n The Sum= “<< sum;
                                                      \nreturn 0;
                                                      \n}<\/p>\n

                                                      \"Samacheer<\/p>\n

                                                      Question 4.
                                                      \nPoint out the type of error in the following program:
                                                      \n#include
                                                      \nusing namespace std;
                                                      \nint main()
                                                      \n{
                                                      \nint h=10; w=12;
                                                      \ncout << “Area of rectangle ” << h+w; >
                                                      \nAnswer:
                                                      \nSyntax error exists. Ie. int h=10;w=12; should written as int h=10,w=12;
                                                      \nThere is also a logical error in the above program.
                                                      \nThe formula for rectangle area is given wrong. This error will not indicate by the compiler.
                                                      \nMODIFIED PROGRAM:
                                                      \n#include
                                                      \nusing namespace std;
                                                      \nint main()
                                                      \n{
                                                      \nint h=10, w=12;
                                                      \ncout << “Area of rectangle ” << h*w;
                                                      \n}
                                                      \nOutput
                                                      \n\"Samacheer<\/p>\n

                                                      DATATYPES, VARIABLES AND EXPRESSIONS<\/span>
                                                      \nBook Evaluation
                                                      \n<\/span>Part -I<\/span><\/p>\n

                                                      Choose The Correct Answer<\/span><\/p>\n

                                                      Question 1.
                                                      \nHow many categories of data types available in C++?
                                                      \na) 5
                                                      \nb) 4
                                                      \nc) 3
                                                      \nd) 2
                                                      \nAnswer:
                                                      \nc) 3<\/p>\n

                                                      Question 2.
                                                      \nWhich of the following data types is not a fundamental type?
                                                      \na) signed
                                                      \nb) int
                                                      \nc) float
                                                      \nd) char
                                                      \nAnswer:
                                                      \na) signed<\/p>\n

                                                      \"Samacheer<\/p>\n

                                                      Question 3.
                                                      \nWhat will be the result of following statement?
                                                      \nchar ch= ‘B’;
                                                      \ncout << (int) ch;
                                                      \na) B
                                                      \nb) b
                                                      \nc) 65
                                                      \nd) 66
                                                      \nAnswer:
                                                      \nd) 66<\/p>\n

                                                      Question 4.
                                                      \nWhich of the character is used as suffix to indicate a floating point value?
                                                      \na) F
                                                      \nb) C
                                                      \nc) L
                                                      \nd) D
                                                      \nAnswer:
                                                      \na) F<\/p>\n

                                                      Question 5.
                                                      \nHow many bytes of memory allocates for the following variable declaration if you are using Dev C++? short int x;
                                                      \na) 2
                                                      \nb) 4
                                                      \nc) 6
                                                      \nd) 8
                                                      \nAnswer:
                                                      \na) 2<\/p>\n

                                                      \"Samacheer<\/p>\n

                                                      Question 6.
                                                      \nWhat is the output of the following snippet?
                                                      \nchar ch = ‘A’;
                                                      \nch= ch + 1;
                                                      \na) B
                                                      \nb) A1
                                                      \nc) F
                                                      \nd) 1A
                                                      \nAnswer:
                                                      \na) B<\/p>\n

                                                      Question 7.
                                                      \nWhich of the following Is not a data type modifier?
                                                      \na) signed
                                                      \nb) int
                                                      \nc) long
                                                      \nd) short
                                                      \nAnswer:
                                                      \nb) int<\/p>\n

                                                      Question 8.
                                                      \nWhich of the following operator returns the size of the data type?
                                                      \na) size of( )
                                                      \nb) int ( )
                                                      \nc) long ( )
                                                      \nd) double ( )
                                                      \nAnswer:
                                                      \na) size of( )<\/p>\n

                                                      \"Samacheer<\/p>\n

                                                      Question 9.
                                                      \nWhich operator to be used to access a reference of a variable?
                                                      \na) $
                                                      \nb) #
                                                      \nc) &
                                                      \nd) !
                                                      \nAnswer:
                                                      \nc) &<\/p>\n

                                                      Question 10.
                                                      \nThis can be used as an alternate to end command:
                                                      \na) \\t
                                                      \nb) \\b
                                                      \nc) \\0
                                                      \nd) \\n
                                                      \nAnswer:
                                                      \nc) \\0<\/p>\n

                                                      \"Samacheer<\/p>\n

                                                      Part II<\/span><\/p>\n

                                                      Very Short Answers<\/span><\/p>\n

                                                      Question 1.
                                                      \nWrite a short note const keyword with an example.
                                                      \nAnswer:
                                                      \nconst is the keyword used to declare a constant, const keyword modifies\/restricts the accessibility of a variable. So, it is known as an Access modifier.
                                                      \nExample:
                                                      \nconst int num =100; indicates that the variable num can not be modified. It remains constant.<\/p>\n

                                                      Question 2.
                                                      \nWhat is the use of setw( ) format manipulator?
                                                      \nAnswer:
                                                      \nsetw ( ):
                                                      \nsetw manipulator sets the width of the field assigned for the output. The field width determines the minimum number of characters to be written in the output.
                                                      \nSyntax:
                                                      \nsetw(number of characters)
                                                      \nExample:
                                                      \ncout << setw(25) << “Net Pay : ” << setw(10)
                                                      \n<< np << endl;<\/p>\n

                                                      Question 3.
                                                      \nWhy is char often treated as an integer data type?
                                                      \nAnswer:
                                                      \nCharacter data type is often said to be an integer type since all the characters are represented in memory by their associated ASCII Codes.<\/p>\n

                                                      \"Samacheer<\/p>\n

                                                      Question 4.
                                                      \nWhat is a reference variable? What is its use?
                                                      \nAnswer:
                                                      \nA reference provides an alias for a previously defined variable. Declaration of a reference consists of base type and an & (ampersand) symbol; reference variable name is assigned the value of a previously declared variable.
                                                      \nSyntax:
                                                      \n<&reference_variable> =
                                                      \nExample:
                                                      \n#include
                                                      \nusing namespace std;
                                                      \nint main( )
                                                      \n{
                                                      \nint num;
                                                      \nint &temp = num; \/\/declaration of a reference variable temp
                                                      \nnum = 100;
                                                      \ncout << “\\n The value of num =” << num;
                                                      \ncout << “\\n The value of temp =” << temp;
                                                      \n}
                                                      \nOutput
                                                      \nThe value of num = 100
                                                      \nThe value of temp = 100<\/p>\n

                                                      Question 5.
                                                      \nConsIder the following C++ statement Are they equivalent?
                                                      \nchar ch=67;
                                                      \nchar ch=\u2019C\u2019;
                                                      \nAnswer:
                                                      \nYes. Both are equivalent. Both assignment statements will store character C\u2019 in the variable ch.<\/p>\n

                                                      Question 6.
                                                      \nwhat Is the difference between 561 and 56?
                                                      \nAnswer:<\/p>\n

                                                        \n
                                                      • 56 indIcate an Integer<\/li>\n
                                                      • 56L indicates Long Integer The suffix L indicates Long. So it stores a long integer<\/li>\n<\/ul>\n

                                                        \"Samacheer<\/p>\n

                                                        Question 7.
                                                        \nDetermine which of the following are valid constant? And specify their type,
                                                        \ni) 0.5
                                                        \nii) ‘Name’
                                                        \niii) ‘\\t’
                                                        \niv) 27,822
                                                        \nAnswer:
                                                        \ni) 0.5 : Valid. Floating-point constant
                                                        \nii) ‘Name’ : Invalid. String constant must be enclosed within double-quotes.
                                                        \niii) ‘\\t’ : Valid. Character constant.
                                                        \niv) 27,822 : Invalid. Comma not allowed with integer constant.<\/p>\n

                                                        Question 8.
                                                        \nSuppose x and y are two double-type variables that you want add as integers and assign to an integer variable. Construct a C++ statement for doing so.
                                                        \nAnswer:
                                                        \ndouble x, y;
                                                        \nint sum;
                                                        \nx = 12.64;
                                                        \ny = 13.56;
                                                        \nsum = (int) x + (int) y;
                                                        \nThe variable sum will have the value of 25 due to explicit casting.<\/p>\n

                                                        Question 9.
                                                        \nWhat will be the result of following if num=6 initially?
                                                        \nAnswer:
                                                        \na) cout << num;
                                                        \n6
                                                        \nb) cout << (num==5);
                                                        \n0<\/p>\n

                                                        \"Samacheer<\/p>\n

                                                        Question 10.
                                                        \nWhich of the following two statements are valid? Why? Also write their result, int a;
                                                        \ni) a=3,014;
                                                        \nii) a =(3,014);
                                                        \nAnswer:
                                                        \ni) a=3,014; – Invalid. Special character comma(,) not allowed.
                                                        \nii) a=(3,014); – Valid. 014 is an octal constant. It will be converted into decimal and then stored in a. So, a will hold 12 as its value.<\/p>\n

                                                        Part – III<\/span><\/p>\n

                                                        Short Answers<\/span><\/p>\n

                                                        Question 1.
                                                        \nWhat are arithmetic operators in C++? Differentiate unary and binary arithmetic operators. Give example for each of them.
                                                        \nAnswer:
                                                        \nArithmetic Operators:
                                                        \nArithmetic operators perform simple arithmetic operations like addition, subtraction, multiplication, division, etc.<\/p>\n\n\n\n\n\n\n\n\n
                                                        Operator<\/td>\nOperation<\/td>\nExample<\/td>\n<\/tr>\n
                                                        +<\/td>\nAddition<\/td>\n10 + 5-15<\/td>\n<\/tr>\n
                                                        \u00a0–<\/td>\nSubtraction<\/td>\n10-5-5<\/td>\n<\/tr>\n
                                                        *<\/td>\nMultiplication<\/td>\n10 * 5 = 50<\/td>\n<\/tr>\n
                                                        \/<\/td>\nDivision<\/td>\n10 \/ 5 = 2 (Quotient of the division)<\/td>\n<\/tr>\n
                                                        %<\/td>\nModulus (To find the reminder of a division)<\/td>\n10 % 3 = 1 (Remainder of the division)<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n

                                                        The above-mentioned arithmetic operators are binary operators which require a minimum of two operands.<\/p>\n

                                                        Unary arithmetic operators:
                                                        \n– (Unary) – The unary minus operator changes the sign of its argument. A positive number ‘ becomes negative and negative number becomes
                                                        \npositive, int a = 5;
                                                        \na = -a; \/\/ a becomes -5
                                                        \n+ (Unary) – The unary plus operator keeps the sign of its argument,
                                                        \nint a = -5;
                                                        \na = +a; \/\/ a still have the value same value -5
                                                        \n(No change)
                                                        \na = 5;
                                                        \na = +a; \/\/ a stil have the same value 5
                                                        \n(No change)
                                                        \nUnary Minus is different from – (Binary) ie. subtraction operator requires two operands.
                                                        \nUnary Plus is different from + (Binary) ie. addition operator requires two operands.
                                                        \n#include
                                                        \nmt mamo
                                                        \n{
                                                        \nmt x=10;
                                                        \nint\u00ff= -10;
                                                        \ninta = -10;
                                                        \n\u2018nt b = 10;
                                                        \ny=+y;
                                                        \na= -a;
                                                        \nb=+b;
                                                        \ncout\u00ab\u201d\\nx = \u201c\u00abX;
                                                        \ncout\u00ab\u201d\\ny = \u201c\u00aby;
                                                        \ncout\u00ab\u201d\\na = \u201c\u00aba;
                                                        \ncout\u00ab\u201d\\nb = \u201c\u00abb;
                                                        \nreturn 0;
                                                        \n\"Samacheer<\/p>\n

                                                        \"Samacheer<\/p>\n

                                                        Question 2.
                                                        \nEvaluate x+= x + ++x; Let x=5;
                                                        \nAnswer:
                                                        \nx=18
                                                        \nCode:
                                                        \nusing namespace std;
                                                        \n#include
                                                        \nint main ()
                                                        \n{<\/p>\n

                                                        int x;
                                                        \nx = 5;
                                                        \nx+= x + ++x;
                                                        \ncout \u00abx;
                                                        \nreturn O;
                                                        \n}
                                                        \nOut put
                                                        \n\"Samacheer<\/p>\n

                                                        Question 3.
                                                        \nHow relational operators and logical operators related to one another?
                                                        \nAnswer:
                                                        \nBoth relational and logical operators will give the evaluation result as Boolean constant value 1 (True) or 0(False).<\/p>\n

                                                        Question 4.
                                                        \nEvaluate the following C++ expressions where x, y, z are integers and m, n are floating
                                                        \npoint numbers. The value of x = 5, y = 4 and
                                                        \nm=2.5;
                                                        \ni) n=x+y\/x;
                                                        \nn=5
                                                        \nii)z=m*x+y;
                                                        \nz=16
                                                        \niii) z = (x++) * m + X;
                                                        \nz = 18
                                                        \nCode:
                                                        \nusing namespace std;
                                                        \n#include
                                                        \nint main()
                                                        \n{
                                                        \nint x,y,z1,z2;
                                                        \nfloat m,n;
                                                        \nx=5;
                                                        \ny=4;
                                                        \nm=2.5;
                                                        \nn = x + y \/ X;
                                                        \nz1=m*x+y;
                                                        \nz2 = (x++) * m + X;
                                                        \ncout<<\u201d\\nN = \u201c<<n;
                                                        \nc\u00f2ut<<\u201d\\nzl =<<z1;
                                                        \ncout<<\u201d\\nz2 =<<z2;
                                                        \nreturn 0;
                                                        \n}
                                                        \noutput
                                                        \n\"Samacheer<\/p>\n

                                                        \"Samacheer<\/p>\n

                                                        11th Computer Science Guide Introduction to C++ Additional Questions and Answers<\/h3>\n

                                                        Choose The Correct Answer 1 Mark<\/span><\/p>\n

                                                        Question 1.
                                                        \nEvery programming language has _____ fundamental element.
                                                        \na) Data types
                                                        \nb) Variables
                                                        \nc) Both A and B
                                                        \nd) None of these
                                                        \nAnswer:
                                                        \nc) Both A and B<\/p>\n

                                                        Question 2.
                                                        \nc++ provides a predefined set of data types for handling the data item is known as …………….. data type.
                                                        \na) Fundamental
                                                        \nb) Built-in data types
                                                        \nc) User-defined
                                                        \nd) Either A or B
                                                        \nAnswer:
                                                        \nd) Either A or B<\/p>\n

                                                        Question 3.
                                                        \nA programmer can create his own data types called as ______ data types.
                                                        \na) Fundamental
                                                        \nb) Built-in data types
                                                        \nc) User defined
                                                        \nd) Either A or B
                                                        \nAnswer:
                                                        \nc) User defined<\/p>\n

                                                        \"Samacheer<\/p>\n

                                                        Question 4.
                                                        \nIn a programming language, fields are referred as ……………
                                                        \na) Variables
                                                        \nb) Data
                                                        \nc) File
                                                        \nd) None of these
                                                        \nAnswer:
                                                        \na) Variables<\/p>\n

                                                        Question 5.
                                                        \nIn a programming language, values are referred to as ……………
                                                        \na) Variables
                                                        \nb) Data
                                                        \nc) File
                                                        \nd) None of these
                                                        \nAnswer:
                                                        \nb) Data<\/p>\n

                                                        Question 6.
                                                        \nIn C++, the data types are classified as ______ main categories.
                                                        \na) three
                                                        \nb) four
                                                        \nc) two
                                                        \nd) five
                                                        \nAnswer:
                                                        \na) three<\/p>\n

                                                        \"Samacheer<\/p>\n

                                                        Question 7.
                                                        \nIn C++, ______ is a data type category.
                                                        \na) Fundamental
                                                        \nb) Derived
                                                        \nc) User defined
                                                        \nd) All the above
                                                        \nAnswer:
                                                        \nd) All the above<\/p>\n

                                                        Question 8.
                                                        \nThe ………….. are the named memory locations to hold values of specific data types.
                                                        \na) Literals
                                                        \nb) Variables
                                                        \nc) Constants
                                                        \nd) None of these
                                                        \nAnswer:
                                                        \nb) Variables<\/p>\n

                                                        Question 9.
                                                        \nThere are ………….. fundamental (atomic) data types in C++.
                                                        \na) two
                                                        \nb) three
                                                        \nc) four
                                                        \nd) five
                                                        \nAnswer:
                                                        \nd) five<\/p>\n

                                                        \"Samacheer<\/p>\n

                                                        Question 10.
                                                        \n…………… is an atomic data type in C++,
                                                        \na) char \/ int
                                                        \nb) float \/ double
                                                        \nc) void
                                                        \nd) All the above
                                                        \nAnswer:
                                                        \nd) All the above<\/p>\n

                                                        Question 11.
                                                        \n………….. are whole numbers without any fraction.
                                                        \na) Integers
                                                        \nb) Characters
                                                        \nc) Strings
                                                        \nd) None of these
                                                        \nAnswer:
                                                        \na) Integers<\/p>\n

                                                        Question 12.
                                                        \nIdentify the correct statement from the ; following.
                                                        \na) Integers can be positive or negative.
                                                        \nb) If you try to store a fractional value in an int type variable it will accept only the integer portion of the fractional value.
                                                        \nc) If a variable is declared as an int, C++ compiler allows storing only integer values into it.
                                                        \nd) All the above
                                                        \nAnswer:
                                                        \nd) All the above<\/p>\n

                                                        \"Samacheer<\/p>\n

                                                        Question 13.
                                                        \n……….. data type accepts and returns all valid \\ ASCII characters.
                                                        \na) Character
                                                        \nb) float
                                                        \nc) void
                                                        \nd) None of these
                                                        \nAnswer:
                                                        \na) Character<\/p>\n

                                                        Question 14.
                                                        \nCharacter data type is often said to be an …………… type.
                                                        \na) float
                                                        \nb) string
                                                        \nc) void
                                                        \nd) int
                                                        \nAnswer:
                                                        \nd) int<\/p>\n

                                                        Question 15.
                                                        \n……………… means significant numbers after decimal point.
                                                        \na) Precision
                                                        \nb) Digit
                                                        \nc) Floating point
                                                        \nd) None of these
                                                        \nAnswer:
                                                        \na) Precision<\/p>\n

                                                        \"Samacheer<\/p>\n

                                                        Question 16.
                                                        \nThe _____ data type is larger and slower than type float.
                                                        \na) Char
                                                        \nb) double
                                                        \nc) void
                                                        \nd) int
                                                        \nAnswer:
                                                        \nb) double<\/p>\n

                                                        Question 17.
                                                        \nThe literal meaning for void is …………….
                                                        \na) Empty space
                                                        \nb) Nothing
                                                        \nc) Blank
                                                        \nd) None of these
                                                        \nAnswer:
                                                        \na) Empty space<\/p>\n

                                                        Question 18.
                                                        \nIn C++, the ……………. data type specifies an empty set of values.
                                                        \na) Char
                                                        \nb) double
                                                        \nc) void
                                                        \nd) int
                                                        \nAnswer:
                                                        \nc) void<\/p>\n

                                                        \"Samacheer<\/p>\n

                                                        Question 19.
                                                        \n……………. is used as a return type for functions that do not return any value.
                                                        \na) Char
                                                        \nb) double
                                                        \nc) void
                                                        \nd) int
                                                        \nAnswer:
                                                        \nc) void<\/p>\n

                                                        Question 20.
                                                        \nIdentify the correct statement from the following.
                                                        \na) One of the most important reason for declaring a variable as a particular data type is to allocate appropriate space in memory.
                                                        \nb) As per the stored program concept, every data should be accommodated in the main memory before they are processed)
                                                        \nc) C++ compiler allocates specific memory space for each and every data handled according to the compiler’s standards.
                                                        \nd) All the above
                                                        \nAnswer:
                                                        \nd) All the above<\/p>\n

                                                        Question 21.
                                                        \nchar data type needs ……………. bytes of memory.
                                                        \na) 8
                                                        \nb) 4
                                                        \nc) 2
                                                        \nd) 1
                                                        \nAnswer:
                                                        \nd) 1<\/p>\n

                                                        \"Samacheer<\/p>\n

                                                        Question 22.
                                                        \nint data type needs ………….. bytes of memory.
                                                        \na) 8
                                                        \nb) 4
                                                        \nc) 2
                                                        \nd) 1
                                                        \nAnswer:
                                                        \nc) 2<\/p>\n

                                                        Question 23.
                                                        \nfloat data type needs …………….. bytes of memory.
                                                        \na) 8
                                                        \nb) 4
                                                        \nc) 2
                                                        \nd) 1
                                                        \nAnswer:
                                                        \nb) 4<\/p>\n

                                                        Question 24.
                                                        \ndouble data type needs ………… bytes of memory.
                                                        \na) 8
                                                        \nb) 4
                                                        \nc) 2
                                                        \nd) 1
                                                        \nAnswer:
                                                        \na) 8<\/p>\n

                                                        \"Samacheer<\/p>\n

                                                        Question 25.
                                                        \nThe range of char data type is ………………
                                                        \na) -127 to 128
                                                        \nb) -32,768 to 32,767
                                                        \nc) 3.4 x 10-38 to 3.4 x 1038 -1
                                                        \nd) 1.7 x 10-308 to 1.7 x 10308 -1
                                                        \nAnswer:
                                                        \na) -127 to 128<\/p>\n

                                                        Question 26.
                                                        \nThe range of int data type is …………..
                                                        \na) -127 to 128
                                                        \nb) -32,768 to 32,767
                                                        \nc) 3.4 x HT38 to 3.4 x 1038-1
                                                        \nd) 1.7 x 10-308 to 1.7 x 10308 -1
                                                        \nAnswer:
                                                        \nb) -32,768 to 32,767<\/p>\n

                                                        Question 27.
                                                        \nThe range of float data type is ……………
                                                        \na) -127 to 128
                                                        \nb) -32,768 to 32,767
                                                        \nc) 3.4 x 10-38 to 3.4 x 1038 -1
                                                        \nd) 1.7 x lO”308 to 1.7 x 10308 -1
                                                        \nAnswer:
                                                        \nc) 3.4 x 10-38 to 3.4 x 1038 -1<\/p>\n

                                                        \"Samacheer<\/p>\n

                                                        Question 28.
                                                        \nThe range of double data type is …………….
                                                        \na) -127 to 128
                                                        \nb) -32,768 to 32,767
                                                        \nc) 3.4 x 10″38 to 3.4 x 1038-1
                                                        \nd) 1.7 x 10-308 to 1.7 x 10308 -1
                                                        \nAnswer:
                                                        \nd) 1.7 x 10-308 to 1.7 x 10308 -1<\/p>\n

                                                        Question 29.
                                                        \n…………….. can be used to expand or reduce the memory allocation of any fundamental data type.
                                                        \na) Modifiers
                                                        \nb) Access specifiers
                                                        \nc) Promoters
                                                        \nd) None of these
                                                        \nAnswer:
                                                        \na) Modifiers<\/p>\n

                                                        Question 30.
                                                        \n………….. are called as Qualifiers.
                                                        \na) Modifiers
                                                        \nb) Access specifiers
                                                        \nc) Promoters
                                                        \nd) None of these
                                                        \nAnswer:
                                                        \na) Modifiers<\/p>\n

                                                        \"Samacheer<\/p>\n

                                                        Question 31.
                                                        \nThere are …………….modifiers used in C++.
                                                        \na) five
                                                        \nb) four
                                                        \nc) three
                                                        \nd) two
                                                        \nAnswer:
                                                        \nb) four<\/p>\n

                                                        Question 32.
                                                        \n……………… is a modifier in C++,
                                                        \na) signed \/ unsigned
                                                        \nb) long
                                                        \nc) short
                                                        \nd) All the above
                                                        \nAnswer:
                                                        \nd) All the above<\/p>\n

                                                        Question 33.
                                                        \nshort data type needs …………. bytes of memory.
                                                        \na) 8
                                                        \nb) 4
                                                        \nc) 2
                                                        \nd) 1
                                                        \nAnswer:
                                                        \nc) 2<\/p>\n

                                                        \"Samacheer<\/p>\n

                                                        Question 34.
                                                        \nunsigned short data type needs ………….. bytes of memory. .
                                                        \na) 8
                                                        \nb) 4
                                                        \nc) 2
                                                        \nd) 1
                                                        \nAnswer:
                                                        \nc) 2<\/p>\n

                                                        Question 35.
                                                        \nsigned short data type needs…………… bytes of memory.
                                                        \na) 8
                                                        \nb) 4
                                                        \nc) 2
                                                        \nd) 1
                                                        \nAnswer:
                                                        \nc) 2<\/p>\n

                                                        Question 36.
                                                        \nsigned long data type needs ……………. bytes of memory.
                                                        \na) 8
                                                        \nb) 4
                                                        \nc) 2
                                                        \nd) 1
                                                        \nAnswer:
                                                        \nb) 4<\/p>\n

                                                        \"Samacheer<\/p>\n

                                                        Question 37.
                                                        \nThe range of unsigned short is …………..
                                                        \na) -32,768 to 32768
                                                        \nb) 0 to 65535
                                                        \nc) -2,147,483,648 to 2,147,483,647
                                                        \nd) 0 to 4,294,967,295
                                                        \nAnswer:
                                                        \nb) 0 to 65535<\/p>\n

                                                        Question 38.
                                                        \nThe range of unsigned long is ……………..
                                                        \na) -32,768 to 32768
                                                        \nb) 0 to 65535
                                                        \nc) -2,147,483,648 to 2,147,483,647
                                                        \nd) 0 to 4,294,967,295
                                                        \nAnswer:
                                                        \nd) 0 to 4,294,967,295<\/p>\n

                                                        Question 39.
                                                        \nThe range of signed long is ……………..
                                                        \na) -32,768 to 32768
                                                        \nb) 0 to 65535
                                                        \nc) -2,147,483,648 to 2,147,483,647
                                                        \nd) 0 to 4,294,967,295
                                                        \nAnswer:
                                                        \nc) -2,147,483,648 to 2,147,483,647<\/p>\n

                                                        \"Samacheer<\/p>\n

                                                        Question 40.
                                                        \nThe range of unsigned char is …………….
                                                        \na) -32,768 to 32768
                                                        \nb) 0 to 65535
                                                        \nc) 0 to 255
                                                        \nd) 0 to 4,294,967,295
                                                        \nAnswer:
                                                        \nc) 0 to 255<\/p>\n

                                                        Question 41.
                                                        \nThe range of long double data type is ……………..
                                                        \na) -127 to 128
                                                        \nb) -32,768 to 32,767
                                                        \nc) 3.4 x 10^932 to 1.1 x 104932 -1
                                                        \nd) 1.7 x 10~308 to 1.7 x 10308 -1
                                                        \nAnswer:
                                                        \nc) 3.4 x 10^932 to 1.1 x 104932 -1<\/p>\n

                                                        Question 42.
                                                        \nint data type needs …………. bytes of memory in Dec C++.
                                                        \na) 8
                                                        \nb) 4
                                                        \nc) 2
                                                        \nd) 1
                                                        \nAnswer:
                                                        \nb) 4<\/p>\n

                                                        Question 43.
                                                        \nunsigned int data type needs ……………… bytes of memory in Dec C++.
                                                        \na) 8
                                                        \nb) 4
                                                        \nc) 2
                                                        \nd) 1
                                                        \nAnswer:
                                                        \nb) 4<\/p>\n

                                                        \"Samacheer<\/p>\n

                                                        Question 44.
                                                        \nsigned int data type needs …………… bytes of memory in Dec C++.
                                                        \na) 8
                                                        \nb) 4
                                                        \nc) 2
                                                        \nd) 1
                                                        \nAnswer:
                                                        \nb) 4<\/p>\n

                                                        Question 45.
                                                        \nlong double data type needs…………… memory in Dec C++.
                                                        \na) 10
                                                        \nb) 8
                                                        \nc) 2
                                                        \nd) 12
                                                        \nAnswer:
                                                        \nd) 12<\/p>\n

                                                        Question 46.
                                                        \nlong double data type needs…………… memory in Turbo C++.
                                                        \na) 10
                                                        \nb) 8
                                                        \nc) 2
                                                        \nd) 12
                                                        \nAnswer:
                                                        \na) 10<\/p>\n

                                                        \"Samacheer<\/p>\n

                                                        Question 47.
                                                        \n…………….. is an operator which gives the size of a data type.
                                                        \na) sizeof()
                                                        \nb) byteof()
                                                        \nc) datatype()
                                                        \nd) None of these
                                                        \nAnswer:
                                                        \na) sizeof()<\/p>\n

                                                        Question 48.
                                                        \nThe suffix……………. is used for floating point values
                                                        \na) U
                                                        \nb) L
                                                        \nC) F
                                                        \nd) None of these
                                                        \nAnswer:
                                                        \nC) F<\/p>\n

                                                        Question 49.
                                                        \nThe suffix ……………… is used for long int values.
                                                        \na) U
                                                        \nb) L
                                                        \nC) F
                                                        \nd) None of these
                                                        \nAnswer:
                                                        \nb) L<\/p>\n

                                                        Question 50.
                                                        \nThe suffix ………….. is used for unsigned int
                                                        \na) U
                                                        \nb) L
                                                        \nC) F
                                                        \nd) None of these
                                                        \nAnswer:
                                                        \na) U<\/p>\n

                                                        \"Samacheer<\/p>\n

                                                        Question 51.
                                                        \n……………… are user-defined names assigned to specific memory locations in which the values are stored.
                                                        \na) Literals
                                                        \nb) Variables
                                                        \nc) Operators
                                                        \nd) None of these
                                                        \nAnswer:
                                                        \nb) Variables<\/p>\n

                                                        Question 52.
                                                        \nThere are ………….. values associated with a symbolic variable
                                                        \na) two
                                                        \nb) three
                                                        \nc) four
                                                        \nd) five
                                                        \nAnswer:
                                                        \na) two<\/p>\n

                                                        Question 53.
                                                        \n…………… is data stored in a memory location.
                                                        \na) L-value
                                                        \nb) R-value
                                                        \nc) T-value
                                                        \nd) B-value
                                                        \nAnswer:
                                                        \nb) R-value<\/p>\n

                                                        \"Samacheer<\/p>\n

                                                        Question 54.
                                                        \n…………… is the memory address in which the R-value is stored.
                                                        \na) L-value
                                                        \nb) R-value
                                                        \nc) T-value
                                                        \nd) B-value
                                                        \nAnswer:
                                                        \na) L-value<\/p>\n

                                                        Question 55.
                                                        \nThe memory addresses are in the form of ……………. values.
                                                        \na) Binary
                                                        \nb) Octal
                                                        \nc) Decimal
                                                        \nd) Hexadecimal
                                                        \nAnswer:
                                                        \nd) Hexadecimal<\/p>\n

                                                        Question 56.
                                                        \nEvery …………. should be declared before they are actually used in a program.
                                                        \na) Variable
                                                        \nb) Operand
                                                        \nc) Literals
                                                        \nd) None of these
                                                        \nAnswer:
                                                        \na) Variable<\/p>\n

                                                        \"Samacheer<\/p>\n

                                                        Question 57.
                                                        \nIf we declare a variable without any initial value, the memory space allocated to that variable will be occupied with some unknown value is called as ………….. values.
                                                        \na) Junk
                                                        \nb) Garbage
                                                        \nc) Either A or B
                                                        \nd) None of these
                                                        \nAnswer:
                                                        \nc) Either A or B<\/p>\n

                                                        Question 58.
                                                        \nA variable can be initialized during the execution of a program is known as ……………..
                                                        \na) Dynamic initialization
                                                        \nb) Static initialization
                                                        \nc) Random initialization
                                                        \nd) None of these
                                                        \nAnswer:
                                                        \na) Dynamic initialization<\/p>\n

                                                        Question 59.
                                                        \n………….. is the keyword used to declare a constant.
                                                        \na) constant
                                                        \nb) const
                                                        \nc) cons
                                                        \nd) None of these
                                                        \nAnswer:
                                                        \nb) const<\/p>\n

                                                        \"Samacheer<\/p>\n

                                                        Question 60.
                                                        \n…………… keyword modifies \/ restricts the accessibility of a variable.
                                                        \na) constant
                                                        \nb) const
                                                        \nc) cons
                                                        \nd) None of these
                                                        \nAnswer:
                                                        \nb) const<\/p>\n

                                                        Question 61.
                                                        \n……………….. is known as Access modifier of a variable.
                                                        \na) constant
                                                        \nb) const
                                                        \nc) cons
                                                        \nd) None of these
                                                        \nAnswer:
                                                        \nb) const<\/p>\n

                                                        Question 62.
                                                        \nDeclaration of a reference consists of ……………..
                                                        \na) Base type
                                                        \nb) An 8i (ampersand) symbol
                                                        \nc) Both A and B
                                                        \nd) None of these
                                                        \nAnswer:
                                                        \nc) Both A and B<\/p>\n

                                                        \"Samacheer<\/p>\n

                                                        Question 63.
                                                        \n……………. are used to format the output of any
                                                        \nC++ program,
                                                        \na) Qualifiers
                                                        \nb) Modifiers \u2018
                                                        \nc) Manipulators
                                                        \nd) None of these
                                                        \nAnswer:
                                                        \nc) Manipulators<\/p>\n

                                                        Question 64.
                                                        \nManIpulators are functions specifically designed to use with the ______ operators.
                                                        \na) Insertion (\u00ab)
                                                        \nb) Extraction(\u00bb)
                                                        \nc) Both A and B
                                                        \nd) None of these
                                                        \nAnswer:
                                                        \nc) Both A and B<\/p>\n

                                                        Question 65.
                                                        \nCommonly used manipulator is …………..
                                                        \na) endl and setw
                                                        \nb) setfill
                                                        \nc) setprecision and setf
                                                        \nd) All the above
                                                        \nAnswer:
                                                        \nd) All the above<\/p>\n

                                                        \"Samacheer<\/p>\n

                                                        Question 66.
                                                        \nendl manipulator is a member of\u00a0 ………………….. header file.
                                                        \na) iomanip
                                                        \nb) iostream
                                                        \nc) manip
                                                        \nd) conio
                                                        \nAnswer:
                                                        \nb) iostream<\/p>\n

                                                        Question 67.
                                                        \nsetw, setfihl, setprecision and setf manipulators are members of______ header file.
                                                        \na) iomanip
                                                        \nb) iostream
                                                        \nc) manip
                                                        \nd) conio
                                                        \nAnswer:
                                                        \na) iomanip<\/p>\n

                                                        Question 68.
                                                        \n______ is used asa line feeder in C++.
                                                        \na) setw
                                                        \nb) setfill
                                                        \nc) endi
                                                        \nd) setf
                                                        \nAnswer:
                                                        \nc) endi<\/p>\n

                                                        \"Samacheer<\/p>\n

                                                        Question 69.
                                                        \n______ can be used as an alternate to \u2018sn\u2019.
                                                        \na) setw
                                                        \nb) setfill
                                                        \nc) endi
                                                        \nd) setf
                                                        \nAnswer:
                                                        \nc) endi<\/p>\n

                                                        Question 70.
                                                        \n______ inserts a new line and flushes the buffer.
                                                        \na) setw
                                                        \nb) setfill
                                                        \nc) endi
                                                        \nd) setf
                                                        \nAnswer:
                                                        \nc) endi<\/p>\n

                                                        Question 71.
                                                        \n______ manipulator sets the width of the field assigned for the output.
                                                        \na) setw
                                                        \nb) set\u00f1hl
                                                        \nc) endi
                                                        \nd) setf
                                                        \ni.) IIUI
                                                        \nU) SeIT
                                                        \nAnswer:
                                                        \na) setw<\/p>\n

                                                        \"Samacheer<\/p>\n

                                                        Question 72.
                                                        \n_______ manipulator is usually used after setw.
                                                        \na) endl
                                                        \nb) setfill
                                                        \nc) endl
                                                        \nd) setf
                                                        \nAnswer:
                                                        \nb) setfill<\/p>\n

                                                        Question 73.
                                                        \n______ is used to display numbers with fractions In specific number of digits.
                                                        \na) \u2018endI
                                                        \nb) setfill i1
                                                        \nc) endl
                                                        \nd) setprecision
                                                        \nAnswer:
                                                        \nd) setprecision<\/p>\n

                                                        Question 74.
                                                        \nsetf() manipulator may be used in form…………..
                                                        \na) Fixed
                                                        \nb) Scientific
                                                        \nc) Both A and B
                                                        \nd) None of these
                                                        \nAnswer:
                                                        \nc) Both A and B<\/p>\n

                                                        \"Samacheer<\/p>\n

                                                        Question 75.
                                                        \nAn expression \u00a1s a combination of ……………………… arranged as per the rules of C++.
                                                        \na) Operators
                                                        \nb) Constants
                                                        \nc) Variables
                                                        \nd) All the above
                                                        \nAnswer:
                                                        \nd) All the above<\/p>\n

                                                        Question 76.
                                                        \nInC++,there are ………………………….. types of expressions used.
                                                        \na) four
                                                        \nb) five
                                                        \nc) seven
                                                        \nd) two
                                                        \nAnswer:
                                                        \nc) seven<\/p>\n

                                                        Question 77.
                                                        \nThe process of converting one fundamental type into another is called as …………………………
                                                        \na) Type Conversion
                                                        \nb) Compiling
                                                        \nc) Inverting
                                                        \nd) None of these
                                                        \nAnswer:
                                                        \na) Type Conversion<\/p>\n

                                                        \"Samacheer<\/p>\n

                                                        Question 78.
                                                        \nc++ provides …………………… types of conversions
                                                        \na) three
                                                        \nb) two
                                                        \nc) four
                                                        \nd) five
                                                        \nAnswer:
                                                        \nb) two<\/p>\n

                                                        Question 79.
                                                        \nC++ provides _____types of conversion.
                                                        \na) Implicit
                                                        \nb) Explicit
                                                        \nc) Both A and B
                                                        \nd) None of these
                                                        \nAnswer:
                                                        \nc) Both A and B<\/p>\n

                                                        Question 80.
                                                        \nA(n) ………………………. type conversion is a conversion performed by the compiler automatically.
                                                        \na) Implicit
                                                        \nb) Explicit
                                                        \nc) BothAandB
                                                        \nd) None of these
                                                        \nAnswer:
                                                        \na) Implicit<\/p>\n

                                                        Question 81.
                                                        \n______conversion is also called as Automatic conversion.
                                                        \na) Implicit \u2018
                                                        \nc) BothAandB
                                                        \nb) Explicit
                                                        \nd) None of these
                                                        \nAnswer:
                                                        \na) Implicit \u2018<\/p>\n

                                                        \"Samacheer<\/p>\n

                                                        Question 82.
                                                        \nData of smaller type\u00a0 converted to the wider type, which is called is as ………………
                                                        \na) Type Promotion
                                                        \nc) Type extended
                                                        \nb) Type upgrade
                                                        \nd) None of these
                                                        \nAnswer:
                                                        \na) Type Promotion<\/p>\n

                                                        Question 83.
                                                        \nc++ allows explicit conversion of variables or expressions from one data type to another specific data type by the programmer Is called as ………….
                                                        \na) Type Promotion
                                                        \nb) Type upgrade
                                                        \nc) Type casting
                                                        \nd) None of these
                                                        \nAnswer:
                                                        \nc) Type casting<\/p>\n

                                                        Very Short Answers 2 Marks<\/span><\/p>\n

                                                        Question 1.
                                                        \nWhat are the classification of data types?
                                                        \nAnswer:
                                                        \nIn C++, the data types are classified as three main categories.<\/p>\n

                                                          \n
                                                        1. Fundamental data types<\/li>\n
                                                        2. User-defined data types and<\/li>\n
                                                        3. Derived data types.<\/li>\n<\/ol>\n

                                                          Question 2.
                                                          \nDefine: Variable.
                                                          \nAnswer:
                                                          \nThe variables are the named memory locations to hold values of specific data types.<\/p>\n

                                                          \"Samacheer<\/p>\n

                                                          Question 3.
                                                          \nGive the syntax for declaring a variable with an example.
                                                          \nAnswer:
                                                          \nSyntax for declaring a variable:
                                                          \nExample:
                                                          \nint num1;
                                                          \nint num1, num2, sum;<\/p>\n

                                                          Question 4.
                                                          \nWhat a the fundamental\/atomic data types in C++?
                                                          \nAnswer:
                                                          \nFundamental (atomic) data types are predefined data types available with C++. There are five fundamental data types in C++: char, int, float, double and void.<\/p>\n

                                                          Question 5.
                                                          \nWrite about int data type.
                                                          \nAnswer:
                                                          \nIntegers are whole numbers without any fraction. Integers can be positive or negative. Integer data type accepts and returns only integer numbers.
                                                          \nIf a variable is declared as an int, C++ compiler allows storing only integer values into it.
                                                          \nIf we try to store a fractional value in an int type variable it will accept only the integer portion of the fractional value.<\/p>\n

                                                          \"Samacheer<\/p>\n

                                                          Question 6.
                                                          \nWhat are the advantages of using float data type?
                                                          \nAnswer:
                                                          \nThere are two advantages of using float data types.<\/p>\n

                                                            \n
                                                          1. They can represent values between the integers.<\/li>\n
                                                          2. They can represent a much greater range of values.<\/li>\n<\/ol>\n

                                                            Question 7.
                                                            \nWhat is the disadvantage of using float data type?
                                                            \nAnswer:
                                                            \nThe floating point operations takes more time to execute compared to the integer type ie., floating point operations are slower than integer operations. This is a disadvantage of floating point operation.<\/p>\n

                                                            Question 8.
                                                            \nWhat do you mean by precision?
                                                            \nAnswer:
                                                            \nPrecision means significant numbers after decimal point of floating point number.<\/p>\n

                                                            Question 9.
                                                            \nTabulate the memory allocation for fundamental data types?
                                                            \nAnswer:
                                                            \nMemory allocation for fundamental data types<\/p>\n\n\n\n\n\n\n\n\n
                                                            Data type<\/td>\n\n

                                                            Space in memory<\/p>\n<\/td>\n<\/tr>\n

                                                            in terms of bytes<\/td>\nin terms of bits<\/td>\n<\/tr>\n
                                                            char<\/td>\n1 byte<\/td>\n8 bits<\/td>\n<\/tr>\n
                                                            int<\/td>\n2 bytes<\/td>\n16 bits<\/td>\n<\/tr>\n
                                                            float<\/td>\n4 bytes<\/td>\n32 bits<\/td>\n<\/tr>\n
                                                            double<\/td>\n8 bytes’<\/td>\n64 bits<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n

                                                            \"Samacheer<\/p>\n

                                                            Question 10.
                                                            \nTabulate the range of value for fundamental data types?
                                                            \nAnswer:<\/p>\n\n\n\n\n\n\n\n
                                                            \n

                                                            Data type<\/p>\n<\/td>\n

                                                            \n

                                                            Range of value<\/p>\n<\/td>\n<\/tr>\n

                                                            char<\/td>\n-127 to 128<\/td>\n<\/tr>\n
                                                            int<\/td>\n-32,768 to 32,767<\/td>\n<\/tr>\n
                                                            float<\/td>\n3.4×10--38<\/sup> to 3.4×1038<\/sup> -1<\/td>\n<\/tr>\n
                                                            double<\/td>\n1.7×10--308<\/sup> to 1.7xl0308<\/sup>-1<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n

                                                            Question 11.
                                                            \nWhat is modifier?
                                                            \nAnswer:
                                                            \nModifiers can be used to modify the memory allocation of any fundamental data type. They are also called as Qualifiers.<\/p>\n

                                                            Question 12.
                                                            \nWhat are the modifiers in C++?
                                                            \nAnswer:
                                                            \nThere are four modifiers used in C++.
                                                            \nThey are;<\/p>\n

                                                              \n
                                                            1. signed<\/li>\n
                                                            2. unsigned<\/li>\n
                                                            3. long<\/li>\n
                                                            4. short<\/li>\n<\/ol>\n

                                                              Question 13.
                                                              \nWhat are the two values associated with a variable?
                                                              \nAnswer:
                                                              \nThere are two values associated with a symbolic variable; they are R-value and L-va!ue.<\/p>\n

                                                                \n
                                                              • R-value is data stored in a memory location.<\/li>\n
                                                              • L-value is the memory address in which the R-value is stored.<\/li>\n<\/ul>\n

                                                                \"Samacheer<\/p>\n

                                                                Question 14.
                                                                \nHow memory addresses are represented?
                                                                \nAnswer:
                                                                \nThe memory addresses are in the form of Hexadecimal values.
                                                                \nExample: .
                                                                \n0x134e represents a memory address.<\/p>\n

                                                                Question 15.
                                                                \nWhat are garbage or junk values?
                                                                \nAnswer:
                                                                \nIf we declare a variable without any initial value, the memory space allocated to that variable will be occupied with some unknown value. These unknown values are called as “Junk” or “Garbage” values.<\/p>\n

                                                                Question 16.
                                                                \nWhat do you mean by dynamic \u00a1nitialization
                                                                \nAnswer:
                                                                \nA variable can be initialized during the execution of a program. It is known as \u201cDynamic
                                                                \ninitiaIization\u2019
                                                                \nFor example: .
                                                                \nint sum = num1+num2;
                                                                \nThis initializes sum using the known values of num1 and num2 during the execution.<\/p>\n

                                                                Question 17.
                                                                \nWhat is the difference between reference and pointer variable?
                                                                \nAnswer:
                                                                \nA reference is an alias for another variable whereas a pointer holds the memory address of a variable.<\/p>\n

                                                                Question 18.
                                                                \nWhat is the purpose of manipulators in C++?
                                                                \nAnswer:
                                                                \nManipulators are used to format the output of any C++ program. Manipulators are functions specifically designed to use with the insertion (<<) and extraction>>) operators.<\/p>\n

                                                                \"Samacheer<\/p>\n

                                                                Question 19.
                                                                \nWhat are the manipulators used in C++?
                                                                \nAnswer:
                                                                \nCommonly used manipulators are:
                                                                \nendl, setw, setfill, setprecision and setf.<\/p>\n

                                                                Question 20.
                                                                \nWrite about the endl manipulator.
                                                                \nAnswer:
                                                                \nendl (End the Line)
                                                                \nendl is used as a line feeder in C++. It can be used as an alternate to ‘\\n’. In other words, endl inserts a new line and then makes the cursor to point to the beginning of the next line.
                                                                \nExample:
                                                                \ncout << “The value of num = ” << num <<endl;<\/p>\n

                                                                Question 21.
                                                                \nWhat is the difference between endl and \\n.
                                                                \nAnswer:
                                                                \nThere is a difference between endl and ‘\\n’, even though they are performing similar tasks.
                                                                \nendl – Inserts a new line and flushes the buffer (Flush means – clean)
                                                                \n‘\\n’ – Inserts only a new line.<\/p>\n

                                                                Question 22.
                                                                \nWrite about setw( ) manipulator.
                                                                \nAnswer:
                                                                \nsetw ( ) :
                                                                \nsetw manipulator sets the width of the field assigned for the output. The field width determines the minimum number of characters to be written in output.
                                                                \nSyntax: ‘
                                                                \nsetw(number of characters)
                                                                \nExample:
                                                                \ncout<< setw(25) << “Basic Pay :”<< setw(10)<< basic<< endl;<\/p>\n

                                                                \"Samacheer<\/p>\n

                                                                Question 23.
                                                                \nWhat is the use of setfill( ) manipulator? setfill ():
                                                                \nAnswer:
                                                                \nThis manipulator is usually used after setw. If the presented value does not entirely fill the given width, then the specified character in the setfill argument is used for filling the empty fields.
                                                                \nSyntax:
                                                                \nsetfill (character);
                                                                \nExample:
                                                                \ncout<<“\\n H.R.A :”<<setw(10)< For example, if we assign 1200 to hra, setw accommodates 1200 in a field of width 10 from right to left and setfill fills p in the remaining 6 spaces that are in the beginning. The output will be, 0000001200.<\/p>\n

                                                                Question 24.
                                                                \nWhat is the purpose of setprecision() manipulator?
                                                                \nAnswer:
                                                                \nsetprecision ( ):
                                                                \nThis is used to display numbers with fractions in specific number of digits.
                                                                \nSyntax:
                                                                \nsetprecision (number of digits);
                                                                \nExample:
                                                                \nfloat hra = 1200.123;
                                                                \ncout << setprecision (5) << hra;
                                                                \nIn the above code, the given value 1200.123 will be displayed in 5 digits including fractions. So, the output will be 1200.1
                                                                \nsetprecision ( ) prints the values from left to right. For the above code, first, it will take 4 digits and then prints one digit from fractional portion.<\/p>\n

                                                                Question 25.
                                                                \nWhIch of the following statements are valid? Why? Also write their result
                                                                \nInta; .
                                                                \ni) a – (014,3);
                                                                \nii) a = (5,017)
                                                                \niii) a = (3,018)
                                                                \nAnswer:
                                                                \ni) a = (014,3); – Valid. A will hold 3. (The second value)
                                                                \nii) a = (5,017) – Valid. 014 \u00a1s an octal constant. It will be converted into decimal and then stored in a. So, a will hold 15 as its value.
                                                                \niii) a = (3,018) – Invalid. Because 8 is not an octal digit. (A number starts with 0 is considered as an octal)<\/p>\n

                                                                \"Samacheer<\/p>\n

                                                                Question 26.
                                                                \nWhich of the following statements are valid? Why? Also write their result.
                                                                \ninta;
                                                                \ni) a = (3,0xA);
                                                                \nii) a = (5,0xCAFE)
                                                                \niii) a = (OXCAFE,0XF)
                                                                \niv) a = (0XCAFE,0XG)
                                                                \nAnswer:
                                                                \ni) a = (3,0xA):
                                                                \nValid. OxA is a hexadecimal constant. It will be converted into decimal and then stored in a. So, a will hold 10 as its value.
                                                                \nii) a = (5,0xCAFE):
                                                                \nValid. OxCAFE is a hexadecimal constant. It will be converted into decimal and then stored in a. So, a will hold 51966 as its value.
                                                                \niii) a = (OXCAFE,0XF):
                                                                \nValid. 0XF is a hexadecimal constant. It will be converted into decimal and then stored in a. So, a will hold 15 as its value.
                                                                \niv) a= (OXCAFE,0XGAB):
                                                                \nInvalid. Because G is not a hexadecimal digit in OXGAB.\\<\/p>\n

                                                                Short Answer 3 Marks<\/span><\/p>\n

                                                                Question 1.
                                                                \nLIstthedattypesinC++.
                                                                \nAnswer:
                                                                \n\"Samacheer<\/p>\n

                                                                Question 2.
                                                                \nWrite about character data type.
                                                                \nAnswer:
                                                                \nCharacter data type accepts and returns all valid ASCII characters. Character data type is often said to be an integer type, since ail the characters are represented in memory by their associated ASCII Codes.
                                                                \nIf a variable is declared as char, C++ allows storing either a character or an integer value.
                                                                \nExample:
                                                                \nchar c=65;
                                                                \nchar ch = ‘A’; Both statements will assign ‘A’ to c and ch.<\/p>\n

                                                                \"Samacheer<\/p>\n

                                                                Question 3.
                                                                \nWrite note on double data type.
                                                                \nAnswer:
                                                                \ndouble data type:
                                                                \nThis data type is for double precision floating point numbers. The double is also used for handling floating point numbers. But, this type occupies double the space than float type. This means, more fractions can be accommodated in double than in float type.
                                                                \nThe double is larger and slower than type float. The double is used in a similar way as that of float data type.<\/p>\n

                                                                Question 4.
                                                                \nCompare memory allocation by Turbo C++ and Dev C++.
                                                                \nAnswer:<\/p>\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
                                                                Data type<\/td>\nMemory size in bytes<\/td>\n<\/tr>\n
                                                                Turbo C++<\/td>\nDev C++<\/td>\n<\/tr>\n
                                                                short<\/td>\n2<\/td>\n2<\/td>\n<\/tr>\n
                                                                unsigned short<\/td>\n2<\/td>\n2<\/td>\n<\/tr>\n
                                                                signed short<\/td>\n2<\/td>\n2<\/td>\n<\/tr>\n
                                                                int<\/td>\n2<\/td>\n4<\/td>\n<\/tr>\n
                                                                unsigned int<\/td>\n2<\/td>\n4<\/td>\n<\/tr>\n
                                                                signed int<\/td>\n2<\/td>\n4<\/td>\n<\/tr>\n
                                                                long<\/td>\n4<\/td>\n4<\/td>\n<\/tr>\n
                                                                unsigned long<\/td>\n4<\/td>\n4<\/td>\n<\/tr>\n
                                                                signed long<\/td>\n4<\/td>\n4<\/td>\n<\/tr>\n
                                                                char<\/td>\n1<\/td>\n1<\/td>\n<\/tr>\n
                                                                unsigned char<\/td>\n1<\/td>\n1<\/td>\n<\/tr>\n
                                                                signed char<\/td>\n1<\/td>\n1<\/td>\n<\/tr>\n
                                                                float<\/td>\n4<\/td>\n4<\/td>\n<\/tr>\n
                                                                double<\/td>\n8<\/td>\n8<\/td>\n<\/tr>\n
                                                                long double<\/td>\n10<\/td>\n12<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n

                                                                \"Samacheer<\/p>\n

                                                                Question 5.
                                                                \nWhat is the purpose of number suffix in C++?
                                                                \nAnswer:
                                                                \nThere are different suffixes for integer and floating point numbers. Suffix can be used to assign the same value as a different type.
                                                                \nFor example, if we want to store 45 in an int, long, unsigned int and unsigned long int, you can use suffix letter L or U (either case) with 45 i.e. 45L or 45U.
                                                                \nThis type of declaration instructs the compiler to store the given values as long and unsigned.
                                                                \n‘F’ can be used for floating point values, example: 3.14F<\/p>\n

                                                                Question 6.
                                                                \nHow setprecision( ) is used to set the number of decimal places?
                                                                \nAnswer:
                                                                \nsetprecision can also be used to set the number of decimal places to be displayed. In order to do this task, we will have to set an ios flag within setf( ) manipulator.
                                                                \nThis may be used in two forms:
                                                                \n(i) fixed and
                                                                \n(ii) scientific.
                                                                \nThese two forms are used when the keywords fixed or scientific are appropriately used before the setprecision manipulator.
                                                                \nExample:
                                                                \n#include
                                                                \n#indude
                                                                \nusing namespace std;
                                                                \nint main()
                                                                \n{
                                                                \ncout.setf(ios::fixed);
                                                                \ncout << setprecision(2)<<0.1;
                                                                \n}
                                                                \nIn the above program, ios flag is set to fixed type; it prints the floating point number in fixed notation. So, the output will be, 0.10
                                                                \ncout.setf(ios: scientific); cout << setprecision(2) << 0.1;
                                                                \nIn the above statements, ios flag is set to scientific type; it will print the floating point number in scientific notation. So, the output wiil
                                                                \nbe, 1.00e-001<\/p>\n

                                                                \"Samacheer<\/p>\n

                                                                Explain In Detail 5 Marks<\/span><\/p>\n

                                                                Question 1.
                                                                \nWhat is an expression? Explain its types with suitable example.
                                                                \nAnswer:
                                                                \nAn expression is a combination of operators, constants and variables arranged as per the rules of C++.
                                                                \nAn expression may consist of one or more operands, and zero or more operators to produce a value. In C++, there are seven types of expressions as given below.<\/p>\n\n\n\n\n\n\n\n\n\n\n
                                                                \n

                                                                Expression<\/p>\n<\/td>\n

                                                                \n

                                                                Description<\/p>\n<\/td>\n

                                                                \n

                                                                Example<\/p>\n<\/td>\n<\/tr>\n

                                                                1.Constant Expression<\/td>\nConstant expression consist only constant values<\/td>\nint num=100;<\/td>\n<\/tr>\n
                                                                2. Integer Expression<\/td>\nThe combination of integer and character values and\/or variables with simple arithmetic operators to produce integer results.<\/td>\nsum = num1 +<\/p>\n

                                                                num2;<\/p>\n

                                                                avg=sum\/5;<\/td>\n<\/tr>\n

                                                                3. Float Expression<\/td>\nThe combination of floating point values and\/or variables with simple\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 arithmetic operators to produce floating point results.<\/td>\nArea=3.14*r*r;<\/td>\n<\/tr>\n
                                                                4. Relational Expression<\/td>\nThe combination of values and\/or variables with relational operators to produce bool(true means 1 or false means 0) values as results.<\/td>\nx>y;<\/p>\n

                                                                a+b==c+d;<\/td>\n<\/tr>\n

                                                                5. Logical Expression<\/td>\nThe combination of values and\/or variables with Logical operators to produce bool values as results.<\/td>\n(a>b)&& (c= = 10);<\/td>\n<\/tr>\n
                                                                6. Bitwise Expression<\/td>\nThe combination of values and\/or variables with Bitwise operators.<\/td>\nx>>3;<\/p>\n

                                                                a<<2;<\/td>\n<\/tr>\n

                                                                7. Pointer Expression<\/td>\nA Pointer is a variable that holds a memory address. Pointer\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 declaration statements.<\/td>\nint *ptr;<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n

                                                                \"Samacheer<\/p>\n

                                                                Question 2.
                                                                \nExplain type conversion in detail.
                                                                \nAnswer:
                                                                \nThe process of converting one fundamental type into another is called as “Type Conversion”. C++ provides two types of conversions.<\/p>\n

                                                                  \n
                                                                1. Implicit type conversion<\/li>\n
                                                                2. Explicit type conversion<\/li>\n<\/ol>\n

                                                                  Implicit type conversion:
                                                                  \nAn Implicit type conversion is a conversion performed by the compiler automatically. So, implicit conversion is also called as \u201cAutomatic
                                                                  \nconversion \u201c.
                                                                  \nThis type of conversion is applied usually whenever different data types are intermixed in an expression. If the type of the operands differs, the compiler converts one of them to match with the other, using the rule that the \u201csmaller\u201d type is
                                                                  \nconverted to the \u201cwider\u201d type, which is called as \u201cType Promotion\u201d
                                                                  \nExample:
                                                                  \n#include<iostream>
                                                                  \nusing namespace std;
                                                                  \nint main()
                                                                  \n{
                                                                  \nint a=6;
                                                                  \nfloat b =3.14;
                                                                  \ncout << a+b
                                                                  \n}
                                                                  \nIn the above program, operand \u2018a\u2019 \u00a1s an mt type and \u2018b\u2019 is a float type. During the execution of the program, \u2018mt\u2019 is converted into a \u2018float because a float is wider than mt.
                                                                  \nHence, the output of the above program will be: 9.14
                                                                  \nExplicit type conversion:
                                                                  \nC++ allows explicit conversion of variables
                                                                  \nor expressions from one data type to another
                                                                  \nspecific data type by the programmer. It is called
                                                                  \nas \u201ctype casting\u201d.
                                                                  \nSyntax:
                                                                  \n(type-name) expression;
                                                                  \nWhere type-name is a valid C++ data type to which the conversion is to be performed.
                                                                  \nExample:
                                                                  \n#include<iostream>
                                                                  \nusing namespace std;
                                                                  \nint main ()
                                                                  \n{
                                                                  \nfloat varf=78.685;
                                                                  \ncout << (int) varf;
                                                                  \n}
                                                                  \nIn the above program, variable varf is declared as a float with an initial value 78.685. The value of varf is explicitly converted to an int type in cout statement. Thus, the final output will be 78.
                                                                  \nDuring explicit conversion, if we assign a value to a type with a greater range, it does not cause any problem. But, assigning a value of a larger type to a smaller type may result in loosing or loss of precision values.
                                                                  \nExample:
                                                                  \n#include <iostream>
                                                                  \nusing namespace std;
                                                                  \nint main()
                                                                  \n{
                                                                  \ndouble varf= 178.25255685;
                                                                  \ncout << (float) varf < < endl;
                                                                  \ncout << (int) varf << endl;
                                                                  \n}
                                                                  \nOutput
                                                                  \n178.253
                                                                  \n178<\/p>\n

                                                                  \"Samacheer<\/p>\n

                                                                  Evaluate Yourself<\/span><\/p>\n

                                                                  Question 1.
                                                                  \nWhat do you mean by fundamental data types?
                                                                  \nAnswer:
                                                                  \nC++ provides a predefined set of data types for handling the data items. Such data types are known as fundamental or built-in data types.<\/p>\n

                                                                  Question 2.
                                                                  \nThe data type char is used to represent characters. Then why is it often termed as an integer type?
                                                                  \nAnswer:
                                                                  \nCharacter data type is often said to be an integer type, since all the characters are represented in memory by their associated ASCII Codes.<\/p>\n

                                                                  Question 3.
                                                                  \nWhat is the advantage of floating point numbers over integers?
                                                                  \nAnswer:
                                                                  \nAdvantages of using float data types.<\/p>\n

                                                                    \n
                                                                  • They can represent values between the integers.<\/li>\n
                                                                  • They can represent a much greater range of values.<\/li>\n<\/ul>\n

                                                                    Question 4.
                                                                    \nThe data type double is another floating point type. Then why is it treated as a distinct data type?
                                                                    \nAnswer:
                                                                    \nThe double is also used for handling floating point numbers. But, this type occupies double the space than float type. This means, more fractions can be accommodated in double than in float type.<\/p>\n

                                                                    \"Samacheer<\/p>\n

                                                                    Question 5.
                                                                    \nWhat is the use of void data type?
                                                                    \nAnswer:
                                                                    \nThe literal meaning for void is ’empty space’. In C++, the void data type specifies an empty set of values. It is used as a return type for functions that do not return any value.<\/p>\n

                                                                    Evaluate Yourself<\/span><\/p>\n

                                                                    Question 1.
                                                                    \nWhat is modifiers? What is the use of modifiers?
                                                                    \nAnswer:
                                                                    \nModifiers are used to modify the storing capacity of a fundamental data type except void type.
                                                                    \nFor example, int data type can store only two bytes of data. In reality, some integer data may have more length and may need more space in memory. In this situation, we should modify the memory space to accommodate large integer values. .
                                                                    \nModifiers can be used to modify the memory allocation of any fundamental data type. They are also called as Qualifiers.<\/p>\n

                                                                    Question 2.
                                                                    \nWhat is wrong with the following C++ statement?
                                                                    \nAnswer:
                                                                    \nlong float x;
                                                                    \nThe modifier long must be associated with only double.<\/p>\n

                                                                    Question 3.
                                                                    \nWhat Is variable? Why a variable called symbolic variable?
                                                                    \nAnswer:
                                                                    \nVariables are user-defined names assigned to specific memory locations in which the values are stored. Variables are also identifiers; and hence,
                                                                    \nthe rules for naming the identifiers should be followed while naming a variable.
                                                                    \nThese are called as symbolic variables because these are named locations.<\/p>\n

                                                                    \"Samacheer<\/p>\n

                                                                    Question 4.
                                                                    \nWhat do you mean by dynamic initialization of a variable? Give an example.
                                                                    \nAnswer:
                                                                    \nA variable can be initialized during the execution of a program. It is known as Dynamic
                                                                    \ninitialization.
                                                                    \nFor example:
                                                                    \nint sum = num1+num2;
                                                                    \nThis initializes sum using the known values of num1 and num2 during the execution.<\/p>\n

                                                                    Question 5.
                                                                    \nWhat is wrong with the following statement?
                                                                    \nAnswer:
                                                                    \nconst int x ;
                                                                    \nIn the above statement x must be initialized. It is missing. It may rewritten as
                                                                    \nconst mt x =10;<\/p>\n

                                                                    Evaluate Yourself<\/span><\/p>\n

                                                                    Question 1.
                                                                    \nWhat is meant by type conversion?
                                                                    \nAnswer:
                                                                    \nThe process of converting one fundamental type into another is called as “Type Conversion”. C++ provides two types of conversions.<\/p>\n

                                                                      \n
                                                                    1. Implicit type conversion<\/li>\n
                                                                    2. Explicit type conversion<\/li>\n<\/ol>\n

                                                                      Question 2.
                                                                      \nHow implicit conversion different from explicit conversion?
                                                                      \nAnswer:
                                                                      \nAn Implicit type conversion is a conversion performed by the compiler automatically. Implicit conversion is also called as “Automatic conversion”.
                                                                      \nAn explicit conversion of variables or expressions from one data type to another specific data type is by the programmer. It is called as “type casting”.<\/p>\n

                                                                      \"Samacheer<\/p>\n

                                                                      Question 3.
                                                                      \nWhat is difference between endl and \\n?
                                                                      \nAnswer:
                                                                      \nThere is a difference between endl and ‘\\n’ even though they are performing similar tasks.
                                                                      \nendl – Inserts a new line and flushes the buffer (Flush means – dean)
                                                                      \n‘\\n’ – Inserts only a new line.<\/p>\n

                                                                      Question 4.
                                                                      \nWhat is the use of references?
                                                                      \nAnswer:
                                                                      \nA reference provides an alias for a previously defined variable. Declaration of a reference consists of base type and an & (ampersand) symbol; reference variable name is assigned the value of a previously declared variable.
                                                                      \nSyntax:
                                                                      \n<&reference_variable>=<\/p>\n

                                                                      Question 5.
                                                                      \nWhat is the use of setprecision ( )?
                                                                      \nAnswer:
                                                                      \nsetprecision ( ):
                                                                      \nThis is used to display numbers with fractions in specific number of digits.
                                                                      \nSyntax:
                                                                      \nsetprecision (number of digits);
                                                                      \nExample:
                                                                      \nfloat hra = 1200.123;
                                                                      \ncout << setprecision (5) << hra;
                                                                      \nThe given value 1200.123 will be displayed in 5 digits including fractions. The output will be 1200.1<\/p>\n

                                                                      \"Samacheer<\/p>\n

                                                                      Hands On Practice<\/span><\/p>\n

                                                                      Question 1.
                                                                      \nWrite C++ programs to interchange the values of two variables.
                                                                      \na) Using with third variable C++PROGRAM:
                                                                      \n#include
                                                                      \nusing namespace std;
                                                                      \nint main()
                                                                      \n{
                                                                      \nintx,y,t;
                                                                      \ncout<<“\\nEnter two numbers”; cin>>x>>y;
                                                                      \ncout<<“\\nValues before interchage
                                                                      \nx=”<<x<<“\\ty=”<<y;
                                                                      \nt=x;
                                                                      \nx=y;
                                                                      \ny=t;
                                                                      \ncout<<“\\nValues after interchage x=”<<x<<“\\ty=”<<y;
                                                                      \nreturn 0;
                                                                      \n}
                                                                      \nOutput
                                                                      \n\"Samacheer<\/p>\n

                                                                      b) Without using third variable C++ PI OGRAM:
                                                                      \n#include
                                                                      \nusing namespace std;
                                                                      \nint main ()
                                                                      \n{
                                                                      \nint x,y;
                                                                      \ncout<<“\\nEnter two numbers”; cin>>x>>y;
                                                                      \ncout<<“\\nValues before interchage
                                                                      \nx=”<<x<<“\\ty=”<<y;
                                                                      \n\/\/interchage process without using third
                                                                      \nvariable
                                                                      \nx=x+y;
                                                                      \ny=x-y;
                                                                      \nx=x-y;
                                                                      \ncout<<“\\nValues after interchage x=”<<x<<“\\ty=”<<y;
                                                                      \nreturn 0;
                                                                      \n}
                                                                      \nOutput
                                                                      \n\"Samacheer<\/p>\n

                                                                      \"Samacheer<\/p>\n

                                                                      Question 2.
                                                                      \nWrite C++ programs to do the following:
                                                                      \na) To find the perimeter and area of a quadrant.
                                                                      \nC++ PROGRAM:
                                                                      \n#include
                                                                      \nusing namespace std;
                                                                      \nint mainQ()
                                                                      \n{
                                                                      \nfloat ppm,area;
                                                                      \ncout<<“\\nEnter radius cin>>r;
                                                                      \narea = 3.14 * r * r \/ 4;
                                                                      \npm = 3.14 * r \/ 2;
                                                                      \ncout<<“\\nQuadrant Area = “<<area;
                                                                      \ncout<<“\\n\\nQuadrant Perimeter = “<<pm;
                                                                      \nreturn 0;
                                                                      \n}
                                                                      \nOutPut
                                                                      \n\"Samacheer<\/p>\n

                                                                      b) To find the area of triangle.
                                                                      \nC++ PROGRAM 1:
                                                                      \n(Area of triangle when b and h values are known)
                                                                      \n#include
                                                                      \nusing namespace std;
                                                                      \nint main()
                                                                      \n{
                                                                      \nfloat b,h,area;
                                                                      \ncout<<“\\nEnter b and h value of triangle cin>>b>>h;
                                                                      \n\/\/ Area of triangle when b and h values are known
                                                                      \narea = b * h \/ 2;
                                                                      \ncout<<“‘\\nBase value = “<<b<<“Height = “<<h<<“Triangle Area = “<<area;
                                                                      \nreturn 0;
                                                                      \n}
                                                                      \nOutPut
                                                                      \n\"Samacheer
                                                                      \nC++ PROGRAM 2:
                                                                      \n(Area of triangle when three sides are known)
                                                                      \n#inciude
                                                                      \n#include using namespace std;
                                                                      \nint main()
                                                                      \n{
                                                                      \nfloat a,b,c,area,s;
                                                                      \ncout<<“\\nEnter three sides of triangle cin>>a>>b>>c;
                                                                      \n\/\/Area of triangle when three sides are known
                                                                      \ns = (a+b+c)\/2;
                                                                      \narea = sqrt(s*(s-a)*(s-b)*(s-c));
                                                                      \ncout<<“\\n Sidel value = “<<a<<“Side2
                                                                      \nvalue = “<<b<<” Side3 value =”<<c;
                                                                      \ncout<<“\\nTriangie Area = “<<area;
                                                                      \nreturn 0;
                                                                      \n}
                                                                      \nOutput
                                                                      \n\"Samacheer
                                                                      \nc. To convert the temperature from Celsius to Fahrenheit.
                                                                      \nC++ PROGRAM:
                                                                      \n\/\/Convertion of the temperature from Celsius to Fahrenheit
                                                                      \n#include< iostream>
                                                                      \nusing namespace std;
                                                                      \nint main()
                                                                      \n{
                                                                      \nfloat c,f;
                                                                      \ncout<<\u201d\\nEnter Celsius value \u201c; cin>>c;
                                                                      \nf=9*c\/5+32;
                                                                      \ncout\u00ab\u201d\\nTemperature in Celsius = \u201c<<C;
                                                                      \ncout < <\u201c\\nTemperature in Fahrenheit =
                                                                      \n\u201c<<f;
                                                                      \nreturn 0;
                                                                      \n}
                                                                      \nOutput
                                                                      \n\"Samacheer<\/p>\n

                                                                      \"Samacheer<\/p>\n

                                                                      Question 3.
                                                                      \nWrite a C++ to find the total and percentage of marks you secured from 10th Standard Public Exam. Display all the marks one-by- one along with total and percentage. Apply formatting functions.
                                                                      \nC++ PROGRAM:
                                                                      \n#include
                                                                      \n#include
                                                                      \nusing namespace std;
                                                                      \nint rnain()
                                                                      \n{
                                                                      \nint tarn,enm,mam,som,scm,total,avg; char name[30];
                                                                      \ncout<<“\\nEnter name of the student cin>>name;
                                                                      \ncout<<“\\nEnterTamil mark”; cin>>tam;
                                                                      \ncout<<“\\nEnter English mark”; cin>>enm;
                                                                      \ncout<<“\\nEnter Maths mark “; cin>>mam;
                                                                      \ncout<<“\\nEnter Science mark “; cin>>scm;
                                                                      \ncout<<“\\nEnter Social Science mark”; cin>>som; .
                                                                      \ntotal = tarn + enm + mam + scm + som; avg = total \/ 5;
                                                                      \ncout<<“\\n\\t\\tlOth Standard Public Exam Mark”<<end!<<endl;
                                                                      \ncout<<setw(30)<<“Name of the student \u00abname<<endk<endl;
                                                                      \ncout<<setw(30)<<setfill(“)<<“Tamil mark
                                                                      \n< <setw(3)< <setfill(‘0’)< <tam< cout<<setw(30)<<setfillC ‘)<<“English
                                                                      \nmark “<setw(3)<<setfill(‘0’)<<enm< cout<<setw(30)<<setfillC ‘)<<“Maths mark
                                                                      \n< <setw(3)< <setfillCO’)< <mam< <endl< <endl;
                                                                      \ncout<<setw(30)<<setfillC ‘)<<“Science
                                                                      \nmark :”<<setw(3)<<setfill(‘0’)<<scm< cout< < setw(3G) < < setfi 11C ‘) < < “Soda I
                                                                      \nScience mark :”<<setw(3)<<setfillC0’)< cout<<setw(30)<<setfillC ‘)\u00ab’Total Marks <<setw(3)<<setfillC0’)<<totak<endk<endl;
                                                                      \ncout<<setw(30)\u00absetfillC ‘)\u00ab”Average mark:”
                                                                      \n<<setw(3)<<setfill(‘0’)< return 0;
                                                                      \n}
                                                                      \nOutput
                                                                      \n\"Samacheer<\/p>\n","protected":false},"excerpt":{"rendered":"

                                                                      Tamilnadu State Board New Syllabus Samacheer Kalvi 11th Computer Science Guide Pdf Chapter 9 Introduction to C++ Text Book Back Questions and Answers, Notes. Tamilnadu Samacheer Kalvi 11th Computer Science Solutions Chapter 9 Introduction to C++ 11th Computer Science Guide Introduction to C++ Text Book Questions and Answers Book Evaluation Part I Choose The Correct …<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":""},"categories":[6],"tags":[],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/tnboardsolutions.com\/wp-json\/wp\/v2\/posts\/33414"}],"collection":[{"href":"https:\/\/tnboardsolutions.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tnboardsolutions.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tnboardsolutions.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/tnboardsolutions.com\/wp-json\/wp\/v2\/comments?post=33414"}],"version-history":[{"count":0,"href":"https:\/\/tnboardsolutions.com\/wp-json\/wp\/v2\/posts\/33414\/revisions"}],"wp:attachment":[{"href":"https:\/\/tnboardsolutions.com\/wp-json\/wp\/v2\/media?parent=33414"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tnboardsolutions.com\/wp-json\/wp\/v2\/categories?post=33414"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tnboardsolutions.com\/wp-json\/wp\/v2\/tags?post=33414"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}