C++ General Interview Questions
Questions Answers Views Company eMail

Write a program to calculate the following i want a c++program for this condition 1+4+9+16+….+100 Like this (1^2+2^2) Hint use function pow(a,b)

HTC, TCS,

4 17327

what are difference between c and c++?

Accenture,

9 9389

how to access grid view row?

1808

how to create window program in c++.please explain.

Microsoft,

1 5287

founder of c++

Microtek, TCS, TeleCommand,

7 10323

How the memory management in vectors are being done. What happens when the heap memory is full, and how do you handle it ?

Yahoo,

1823

What is the best sorting algorithm, when there is a large amount of data, that cannot be fit in the main memory. ?

Yahoo,

1 6180

How do you initialize a class member, class x { const int i; };

emc2,

8 8122

advantages and disadvantages of using Borland C++ / version 5.

1 8291

Read the following program carefully and write the output of the program. Explain each line of code according to given numbering. #include #include #include #include 1……………… int main (void) { pid_t pid; 2………………………… pid = fork(); 3…………………………. if (pid > 0) { int i; 4………………………… for (i = 0; i < 5; i++) { 5………………… …………… printf(" I AM VU : %d\n", i); 6………………… …………… sleep(1); } exit(0); } 7………………… ……… else if (pid == 0) { int j; for (j = 0; j < 5; j++) { 8……………………………… printf(" I have no child: %d\n", j); sleep(1); } _exit(0); } else { 9………………………………fprintf(stderr, "can't fork, error %d\n", errno); 10……………… … ………… exit (EXIT_FAILURE); } }

1 3697

write a corrected statement so that the instruction will work properly. if (4 < x < 11) y = 2 * x;

1499

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

1450

Write a corrected statement in c++ so that the statement will work properly. if (4 < x < 11) y=2*x;

1495

Write a corrected statement in c++ so that the statement will work properly. if (x > 5); y = 2*x; else y += 3+x;

1 2346

Write a corrected statement in c++ so that the statement will work properly. if (x = y) x = 2*z;

2 3173


Post New C++ General Questions

Un-Answered Questions { C++ General }

Incase of a function declaration, what is extern means?

507


Can we get the value of ios format flags?

652


What is c++ and its uses?

608


What are disadvantages of pointers?

557


What is the difference between while and do while loop? Explain with examples.

587






How can you prevent accessing of the private parts of my class by other programmers (violating encapsulation)?

635


Explain bubble sorting.

618


What is the average salary of a c++ programmer?

534


Explain public, protected, private in c++?

561


What is data binding in c++?

497


What is scope resolution operator in c++ with example?

547


If all is successful, what should main return a) 0 b) 1 c) void

552


Is c++ vector dynamic?

563


What is the hardest coding language to learn?

592


Why is that unsafe to deal locate the memory using free( ) if it has been allocated using new?

615