menu-iconExamlexExamLexServices

Discover

Ask a Question
  1. All Topics
  2. Topic
    Computing
  3. Study Set
    Object Oriented Programming (OOP)
  4. Exam
    Exam 4: C++ Programming and Concepts: Inheritance, Data Types, Objects, and Output Prediction
  5. Question
    #Include<iostream> Using Namespace Std;class X{public:int X;};int Main(){X a = {10};X
Solved

#Include<iostream> Using Namespace Std;class X{public:int X;};int Main(){X a = {10};X

Question 1

Question 1

Multiple Choice

#include<iostream> using namespace std;class X{public:int x;};int main() {X a = {10};X b = a;cout <<a.x <<" " <<b.x; return 0;}


A) compiler error
B) 10 followed by garbage value
C) 10 10
D) 10 0

Correct Answer:

verifed

Verified

Related Questions

Q2: Which of the following is true?<br>A)all objects

Q3: Which of the following approach is adopted

Q4: How many objects can be created from

Q5: C++ was originally developed by ….......<br>A)donald knuth<br>B)bjarne

Q6: Which of the following is true about

Q7: Is it fine to call delete twice

Q8: If particular software can be used in

Q9: The main intention of using inheritance is

Q10: Which of the followings is/are automatically added

Q11: Which of the following data type does

Examlex

ExamLex

About UsContact UsPerks CenterHomeschoolingTest Prep

Work With Us

Campus RepresentativeInfluencers

Links

FaqPricingChrome Extension

Download The App

Get App StoreGet Google Play

Policies

Privacy PolicyTerms of ServiceHonor CodeCommunity Guidelines

Scan To Download

qr-code

Copyright © (2025) ExamLex LLC.

Privacy PolicyTerms Of ServiceHonor CodeCommunity Guidelines