write infinite loop in C++ which does not use any variable
or constant?

Answers were Sorted based on User's Feedback



write infinite loop in C++ which does not use any variable or constant?..

Answer / sxx

for(;;)

Is This Answer Correct ?    27 Yes 3 No

write infinite loop in C++ which does not use any variable or constant?..

Answer / chetan bhola

while(1)
{
;
}

Is This Answer Correct ?    1 Yes 4 No

write infinite loop in C++ which does not use any variable or constant?..

Answer / gyanendra verma

#include<iostream.h>
#include<conio.h>
void main()
{
while!kbhit())
{
gotoxy(10,20);
printf(" Infinite loop by gyanendra verma ";
}
getch();
}
kbhit() : - A function that wait untill key press

Is This Answer Correct ?    3 Yes 14 No

Post New Answer

More C++ General Interview Questions

catch(exception &e) { . . . } Referring to the sample code above, which one of the following lines of code produces a written description of the type of exception that "e" refers to? a) cout << e.type(); b) cout << e.name(); c) cout << typeid(e).name(); d) cout << e.what(); e) cout << e;

2 Answers   Quark,


Describe protected access specifiers?

0 Answers  


You run a shell on unix system. How would you tell which shell are you running?

0 Answers  


How Virtual functions call up is maintained?

2 Answers  


What is data structure in c++?

0 Answers  






what are the characteristics of Class Members in C++?

0 Answers  


Why we use #include conio h in c++?

0 Answers  


True or false, if you keep incrementing a variable, it will become negative a) True b) False c) It depends

0 Answers  


what is oops and list its features in c++?

0 Answers  


What are the types of STL containers?

4 Answers  


What are the weaknesses of C++?

1 Answers  


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 Answers  


Categories