adplus-dvertising

Welcome to the Data Types in C++ MCQs Page

Dive deep into the fascinating world of Data Types in C++ with our comprehensive set of Multiple-Choice Questions (MCQs). This page is dedicated to exploring the fundamental concepts and intricacies of Data Types in C++, a crucial aspect of Object Oriented Programming Using C++. In this section, you will encounter a diverse range of MCQs that cover various aspects of Data Types in C++, from the basic principles to advanced topics. Each question is thoughtfully crafted to challenge your knowledge and deepen your understanding of this critical subcategory within Object Oriented Programming Using C++.

frame-decoration

Check out the MCQs below to embark on an enriching journey through Data Types in C++. Test your knowledge, expand your horizons, and solidify your grasp on this vital area of Object Oriented Programming Using C++.

Note: Each MCQ comes with multiple answer choices. Select the most appropriate option and test your understanding of Data Types in C++. You can click on an option to test your knowledge before viewing the solution for a MCQ. Happy learning!

Data Types in C++ MCQs | Page 9 of 11

Q81.
What is the output of this program?
    #include <iostream>
    using namespace std;
    void addprint()
    {
        static int s = 1;
        s++;
        cout << s;
    }
    int main()
    {
        addprint();
        addprint();
        addprint();
        return 0;
    }
Discuss
Answer: (a).234
Q82.
What is the output of this program?
    #include <iostream>
    using namespace std;
    int main()
    {
        int a = 10;
        if (a < 10) {
            for (i = 0; i < 10; i++)
               cout << i;
        }
        else {
            cout << i;
        }
        return 0;
    }
Discuss
Answer: (d).error
Q83.
Identify the incorrect statements.

int var = 10;
int *ptr = &(var + 1); //statement 1
int *ptr2 = &var; //statement 2
&var = 40; //statement 3
Discuss
Answer: (c).Statement 1 and 3 are wrong
Q84.
Identify the type of the variables.

typedef char* CHAR;
CHAR p,q;
Discuss
Answer: (a).char*
Q85.
Evaluate the following expression:
3 >6&&7>4
Discuss
Answer: (b).False
Q86.
Special data types that are defined by users is called
Discuss
Answer: (c).Enumeration types
Q87.
In C++ the words that is already defined and is reserved for a single special purpose, is called as
Discuss
Answer: (a).Keywords
Q88.
There are how many relational operator are offered by C++?

a.

2

b.

4

c.

5

d.

6

Discuss
Answer: (d).6
Discuss
Answer: (a).Console input
Q90.
Which from the following is not a relational operator?
Discuss
Answer: (d).None of them

Suggested Topics

Are you eager to expand your knowledge beyond Object Oriented Programming Using C++? We've curated a selection of related categories that you might find intriguing.

Click on the categories below to discover a wealth of MCQs and enrich your understanding of Computer Science. Happy exploring!