• Result
  • Today's Puzzle
    • Previous Puzzles
    • Prize & Rules
  • Discussion Board
    • Suggestion Board
    • Trending Articles
  • Maths Tricks
  • Placement Papers
    • Placement Questions
    • Interview Experience
    • Placed user Comment
    • Group Discussion
  • English APP
  • login
  • Result
  • Today's Puzzle
    • Previous Puzzles
    • Prize & Rules
  • Discussion Board
    • Suggestion Board
    • Trending Articles
  • Maths Tricks
  • Placement Papers
    • Placement Questions
    • Interview Experience
    • Placed user Comment
    • Group Discussion
  • Walkins
    • Corporate Job Exam
    • Government Job Exam
    • Entrance Exam
  • Training
    • Internship
  • Placement Questions
  • /
  • C++

Frequently Asked C++ interview questions and answers for freshers

C++ Select Another Category Select Another Topic

Programming and Technical

  • Android 118
  • ASP.NET 60
  • C 459
  • C++ 448
  • DATA STRUCTURE 66
  • DBMS 77
  • ELECTRONICS 39
  • Java 261
  • OOPs Concepts 117
  • Operating Syst 103
  • RDBMS 109
  • UNIX 70

C++ Question Topics

    Category (1)

    General Ability (4)

  • General Knowledge (2)
  • HR Interview (1)

  • Interview (1)
  • Logical Reasoning (5)

  • Blood Relations (3)
  • Coding Decoding (1)
  • General Mental Ability (1)
  • Numerical Ability (1)

  • Area and Volume (1)
  • Programming (67)

  • Basics (1)
  • Database (2)
  • Definition (16)
  • Program (14)
  • Technical (32)
  • Variables (1)
Keep an EYE (0)
Solved Question (1) UnSolved Question (447)
Pages: 45123456789NextLast
Advertisements

(#M40028555) C++ QUESTION Technical Question on C++ and OOPS Keep an EYE Keep an eye puzzle Keep an eye puzzle

Which of the following statements is correct?

Options
1) First time method of a class is called, the constructor method is called.
2) Every time method of a class is called, the constructor method is called.
3) Every time an instance of a class is created, the constructor method is called.
4) None of the above

Asked In C++ MAN (12 years ago)
Unsolved Read Solution (2)
Is this Puzzle helpful?   (43)   (20) Submit Your Solution Technical

(#M40031849) C++ QUESTION Keep an EYE Keep an eye puzzle Keep an eye puzzle

What will be the output for the following C++ program ..??

class Sample
{
public:
int *ptr;
Sample(int i)
{
ptr = new int(i);
}
~Sample()
{
delete ptr;
}
void PrintVal()
{
cout << "The value is " << *ptr;
}
};
void SomeFunc(Sample x)
{
cout << "Say i am in someFunc " << endl;
}
int main()
{
Sample s1= 10;
SomeFunc(s1);
s1.PrintVal();
}

Asked In C++ Rajendra Singh (11 years ago)
Unsolved Read Solution (4)
Is this Puzzle helpful?   (7)   (5) Submit Your Solution Program
Advertisements

(#M40155993) C++ QUESTION Keep an EYE Keep an eye puzzle Keep an eye puzzle

Pankaj makes a program to print the product of cubes of the first 10 whole numbers.

She writes the following program:

integer x = 0 // statement 1

integer x = 0 // statement 1

integer sum = 0 // statement 2

while ( x < 10 ) // statement 3

{

sum = x*x*x // statement 4


x = x + 1 // statement 5

}

print sum // statement 6


Is her program correct? If not, which statement will you modify to correct it?

a. No error, the program is correct

b. Statement 1

c. Statement 4

d. statement 6

Asked In C++ abhinav (9 years ago)
Unsolved Read Solution (9)
Is this Puzzle helpful?   (31)   (16) Submit Your Solution undefined

(#M40028245) C++ QUESTION C++ programs Keep an EYE Keep an eye puzzle Keep an eye puzzle

Inheritance is also known as -------- relationship. Containership as ________ relationship

Asked In C++ MAN (12 years ago)
Unsolved Read Solution (1)
Is this Puzzle helpful?   (2)   (2) Submit Your Solution

(#M40028206) C++ QUESTION C++ Keep an EYE Keep an eye puzzle Keep an eye puzzle

What is destructors?

Asked In C++ MAN (12 years ago)
Unsolved Read Solution (3)
Is this Puzzle helpful?   (0)   (0) Submit Your Solution Definition

(#M40028192) C++ QUESTION C++ Keep an EYE Keep an eye puzzle Keep an eye puzzle

What are the c++ tokens ?

Asked In C++ MAN (12 years ago)
Unsolved Read Solution (2)
Is this Puzzle helpful?   (0)   (0) Submit Your Solution Definition

(#M40028217) C++ QUESTION C++ Keep an EYE Keep an eye puzzle Keep an eye puzzle

What is a container class? What are the types of container classes?

Asked In C++ MAN (12 years ago)
Unsolved Read Solution (1)
Is this Puzzle helpful?   (1)   (0) Submit Your Solution Technical

(#M40028549) C++ QUESTION Technical Question on C++ and OOPS Keep an EYE Keep an eye puzzle Keep an eye puzzle

What will be the output of following program?

main()
{
int i=1;
for(;i<=32768;i++)
printf("%d",i);
}

Options
1) 32767
2) infinite loop
3) 32768
4) None of the above

Asked In C++ MAN (12 years ago)
Unsolved Read Solution (2)
Is this Puzzle helpful?   (11)   (4) Submit Your Solution Program

(#M40030279) C++ QUESTION C++ Keep an EYE Keep an eye puzzle Keep an eye puzzle

When should you use a const reference parameter?
a) Whenever the data type might be many bytes.
b) Whenever the data type might be many bytes,
the function changes the parameter within its
body, and you do NOT want these changes to
alter the actual argument.
c) Whenever the data type might be many bytes,
the function changes the parameter within its
body, and you DO want these changes to alter
the actual argument.
d) Whenever the data type might be many bytes,
and the function does not change the parameter
within its body

Asked In C++ MAN (11 years ago)
Unsolved
Is this Puzzle helpful?   (2)   (0) Submit Your Solution General Knowledge

(#M40028240) C++ QUESTION C++ programs Keep an EYE Keep an eye puzzle Keep an eye puzzle

class complex{
double re;
double im;
public:
complex() : re(1),im(0.5) {}
bool operator==(complex &rhs);
operator int(){}
};
bool complex::operator == (complex &rhs){
if((this->re == rhs.re) && (this->im == rhs.im))
return true;
else
return false;
}
int main(){
complex c1;
cout

Asked In C++ MAN (12 years ago)
Unsolved
Is this Puzzle helpful?   (3)   (1) Submit Your Solution Interview
Keep an EYE (0)
Solved Question (1) UnSolved Question (447)
Pages: 45123456789NextLast
  • Login
  • Register

Resend

Sponsored Links

Advertisements

Challenger of the Day

no image
Dimple
India
Punjab
Time: 00:01:33
Points
19

Maths Quotes

The pulse of the earth is mathematics

Hithesh

Mathematics is made of 50 percent formulas, 50 percent proofs, and 50 percent imagination.

Unknown

Placed User Comments

M4Math helped me a lot.

Vipul Chavan 5 years ago

Thanks m4 maths for helping to get placed in several companies.
I must recommend this website for placement preparations.

yash mittal 5 years ago

Now enjoy Offline Access of latest Question.

Get M4maths app to avail expert's solution and latest selected questions.

Download m4maths app now

  • 2533K+Registerd user
  • 1774K+Engineers
  • 759K+MBA Asprirant
  • 3K+Enginnering College
  • 250+Company Exam
  • 150K+Interview Questions
  • Site Links
  • Home
  • Result
  • Today's Puzzle
  • Discussion Board
  • Maths Tricks
  • Advertise with us
  • Contact Us
  • Useful Info
  • Maths Quotes
  • Previous Puzzles
  • Prize
  • Privacy Policy
  • Disclaimer and Copyright
  • Terms and Conditions
  • Sitemap
  • Placement papers
  • TCS Placement Paper
  • HCL Placement Paper
  • INFOSYS Placement Paper
  • IBM Placement Paper
  • SYNTEL Placement Paper
  • TECHNICAL Interview
  • HR Interview
All rights are reserved to @m4maths.com