Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...


We all know that a const variable needs to be initialized at the time of declaration. Then how come the program given below runs properly even when we have not initialized p?


No Answer is Posted For this Question
Be the First to Post Answer

Post New Answer

More C++ General Interview Questions

What is flush programming?

0 Answers  


Define precondition and post-condition to a member function?

1 Answers  


what is the use of templates?

3 Answers  


Read the following program carefully and write the output of the program. Explain each line of code according to given numbering. #include <stdio.h> #include <unistd.h> #include <stdlib.h> #include <errno.h> 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 Answers  


What is the difference between structures and unions?

0 Answers  






What can I use instead of namespace std?

0 Answers  


What is constructor in C++?

0 Answers  


How to implement is-a and has-a class relationships?

0 Answers  


What do you mean by call by value and call by reference?

1 Answers  


Do you know what are the new features that iso/ansi c++ has added to original c++ specifications?

0 Answers  


A mXn matrix is given and rows and column are sorted as shown below.Write a function that search a desired entered no in the matrix .with minimum complexity 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16

0 Answers  


Write the program form Armstrong no in c++?

11 Answers   HCL,


Categories