C++ General Interview Questions
Questions Answers Views Company eMail

Write a corrected statement in c++ so that the statement will work properly. x =+ 7;

2 2971

Write a corrected statement in c++ so that the statement will work properly. x + y=z;

2 3177

If you had the following code: int x = 23; int *y; y = &x; The instruction y++; does what?

2 3767

Write a single instruction that will find the remainder of integral division when x is divided by y. Have the answer stored in z.

1 2808

Write a single instruction that will store an EVEN random integer between 54 and 212 inclusive in the variable myran. (NOTE only generate EVEN random numbers)

1477

Given the following seqment of code containing a group of nested if instructions: y = 9; if ((x==3) || (x == 5)) y++; else if (x == 2) y *= 2; else if (x == ) y-= 7; else y = 8; if the value of x is 4 before the nested IFs are executed, what is the value of y after the nested IFs are executed?

1574

Given the following seqment of code containing a group of nested if instructions: y = 9; if ((x==3) || (x == 5)) y++; else if (x == 2) y *= 2; else if (x == 4 ) y-= 7; else y = 8; Enter a segment of code (without any IF statements) that does exectly the same thing using the switch structure.

1 3018

Given the following function definition: int doit(int &x, int y, int &z) { x = 3*x; y = y + 5; z = x+y; return z - 4; } int a = 5, b = 7, c = 9, d = 11; d = doit(a,b,c);

2 5986

Write a C/C++ program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the maximum number of concurrent threads that the InnoDB plug-in can create

2058

#include void main() { class x { public: int func(int) { cout<<"cool"; return 1; } } }

Infosys,

1 3937

Write a program and call it sortcheck.cpp which receives 10 numbers from input and checks whether these numbers are in ascending order or not. You are not allowed to use arrays. You should not define more than three variables

BirlaSoft, Crayonz,

2 3864

write a c++ program that gives output 1 1 2 1 2 3 1 2 3 4 1 2 3 4 5 using looping statement

2 5074

What do you mean by abstraction. Explain your answer?

5 11503

What is compilation?

Datamatics, TCS,

1 4474

Write a C/C++ program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the total number of disk writes by MySQL.

Webyog,

4 10027


Post New C++ General Questions

Un-Answered Questions { C++ General }

What are structs in c++?

589


What is operators in c++?

561


When do we run a shell in the unix system?

553


What are c++ storage classes?

610


What is string in c++ programming?

610






How do you establish a has-a relationship?

603


Can a constructor return a value?

567


What are protected members in c++?

607


How do you flush std cout?

557


What is the use of string in c++?

539


Can manipulators fall in love?

557


Can comments be nested?

614


Is map ordered c++?

581


What are the benefits of oop in c++?

576


What are the two shift operators and what are their functions?

549