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

What is a dll entry point?

0 Answers  


Does c++ support exception handling?

0 Answers  


What is c++ namespace?

0 Answers  


Define private, protected and public access control.

0 Answers  


What is purpose of new operator?

0 Answers  


In a function declaration what does extern means?

0 Answers   Flextronics,


Write a program which uses Command Line Arguments

0 Answers  


You have to take 2 arrays of length 10. Input the values of array 1 from the user. Then copy the values of array 1 to array 2 in ascending order For example if user enters 9, 5, 6, 8, 1, 0, 2, 7, 4, 3 then copy the smallest element i.e. 0 first followed by 1, 2 and so

1 Answers  


Evaulate: 22%5 a) 2 b) 4 c) 0

0 Answers  


What does new in c++ do?

0 Answers  


which one is equivalent to multiplying by 2:Left shifting a number by 1 or Left shifting an unsigned int or char by 1?

0 Answers  


int *p = NULL; printf("%1d",p) ; what will be the output of this above code?

3 Answers   Microsoft,


Categories