Solve This (? + ? + ?=30)
If 1111=R, 2222=T, 3333=E, 4444=N Then 5555=?
Guess the Hindi Muhawara from the following whatsapp Emoticons?
Sweet, Medicine, Film, Girl, City, Car, Place, Doggy all are name same, guess which word it is?
A girl is blind, deaf, dumb and uneducated too. A boy loves her. How would he propose without touching her?
Four Question, One Answer: One River Name, One Flower Name, One Film Name, One Actress Name?
Guess me who am I, I am the first on earth, the second in heaven...
Which Indian cricketer is known as "Brown Bradman"?
How can i register in planetwin365?
What is the second longest named river in the USA, which runs from Lake Itasca, Minnesota, to the Gulf of Mexico?
While(1) is a infinite loop so if you need to come out of it then you need to issue the break statement explicitly.
While(0) means non entry and code under while will never get executed.
printf("%d\n", i++); // This will never get executed
// will never be executed as condition always FALSE
// will never given up as condition always TRUE
// this will be used in Multitasking/Threading concepts.
Actually While of something (i.e) while( X ) X is the condition we are giving to run the loop for X times, so as we know that in C the value 0 have meaning called FALSE(0x00000000). so whenever a loop receives a FALSE input it will just leave the loop and proceeds with the next immediate statement.
looking into While(X), if X = 1, here the value X = 1 will be taken as TRUE (i.e) 0xffffffff, so not only while(1) while (ANY NON ZERO VALUE) can run as infinite loop other than X = 0. simply ,the condition for the loop is always TRUE.
so usually we have to give a condition for the loop to break.
while(1) Is infinite loop & While(0) Do not enter in while loop it directed exit the loop
While(0) means dont enter into it, but why you want to have while(0) in c code. Any suggestion.
Asked in the interview today.
Array consist of -1 and 1, Find count of all sub-arrays where sum = 0.
Forgot Your Password?
2018 © Queryhome