what is the difference between while and do while?
Answers were Sorted based on User's Feedback
Answer / jithender palle
In while case first execute the condition then ++/--,
In do while first ++/-- then condition execute
| Is This Answer Correct ? | 9 Yes | 0 No |
Answer / bhairavi
in while loop first condition is checked & then ++/-- is
done, in do while first whatever the condition given loop
execute atleast once ie.if i=0 the condition is while
(i<=0), i++ then also in do while loop i will increment
first & then it will check the condition so final value of
i will be 1
| Is This Answer Correct ? | 3 Yes | 0 No |
Explain demand paging.
List some basic data types in c?
#include main() { int *p, *c, i; i = 5; p = (int*) (malloc(sizeof(i))); printf(" %d",*p); *p = 10; printf(" %d %d",i,*p); c = (int*) calloc(2); printf(" %d ",*c); }
what is the difference between exit() and _exit() functions?
What are predefined functions in c?
write a program that will accept two integers and will implement division without using the division operator if the second value is an odd number and will implement multiplication without using multiplication operator if the second value is an even number.
#include<stdio.h> #include<conio.h> void main() { float a; clrscr(); a=0.5; if(a==0.5) printf("yes"); else printf("no"); getch(); }
What is spaghetti programming?
What is the real difference between arrays and pointers?
27 Answers Hexaware, Logic Pro, TCS,
Explain the difference between exit() and _exit() function?
How is a two dimensional array passed to function when the order of matrix is not known at complie time?
If I want to initialize the array like. int a[5] = {0}; then it gives me all element 0. but if i give int a[5] = {5}; then 5 0 0 0 0 is ans. what will I do for all element 5 5 5 5 5 in a single statement???