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 are the advantages of using friend classes?

0 Answers  


What is virtual base class uses?

0 Answers  


3- Write a program to find larger and smaller of the two numbers.

4 Answers   Luminous,


What problem does the namespace feature solve?

1 Answers  


a class that maintains a pointer to an object that is programatically accessible through the public interface is known as?

2 Answers   CTS,






1)#include <iostream.h> int main() { int *a, *savea, i; savea = a = (int *) malloc(4 * sizeof(int)); for (i=0; i<4; i++) *a++ = 10 * i; for (i=0; i<4; i++) { printf("%d\n", *savea); savea += sizeof(int); } return 0; } 2)#include <iostream.h> int main() { int *a, *savea, i; savea = a = (int *) malloc(4 * sizeof(int)); for (i=0; i<4; i++) *a++ = 10 * i; for (i=0; i<4; i++) { printf("%d\n", *savea); savea ++; } return 0; } The output of this two programs will be different why?

5 Answers  


write a program to insert an element into an array

26 Answers   TCS,


How do you find out if a linked-list has an end? (I.e. The list is not a cycle)

0 Answers  


Explain object slicing in c++?

0 Answers  


List out function which we can call without using object

1 Answers  


What is the difference between #define debug 0 and #undef debug?

0 Answers  


What are disadvantages of pointers?

0 Answers  


Categories