Difference between for loop and while loop?
Answer / dev yadav
in for loop we should know initial &last condition.....but in while loop we only know the last condition....
ex. of for loop..for(i=0;i<=10;i++){
printf("%d",i);
}
ex. of while loop..while(i<=10){
printf("%d",i);
i++;
}
| Is This Answer Correct ? | 10 Yes | 4 No |
How to print India by nested loop? I IN IND INDI INDIA
main() { char p[] = "hello world!"; p = "vector"; printf("%s",p); }
2 Answers Vector, Vector India,
Why do we need arrays in c?
How Many Header Files in c?
What is the purpose of & in scanf?
What is a void pointer? When is a void pointer used?
parkside's triangle.. create a program like this.. enter the size: 6 enter the seed: 1 output: 1 23 456 7891 23456 789123 sample2: enter the size: 5 enter the seed: 3 output: 3 45 678 9123 45678 parkside should not exceed 10 while its seed should only be not more than 9..
Can the sizeof operator be used to tell the size of an array passed to a function?
how to print "hai" in c?
Why c is a mother language?
What is table lookup in c?
In the following code segment what will be the result of the function, value of x , value of y { unsigned int x=-1; int y; y = ~0; if(x == y) printf("same"); else printf("not same"); } a) same, MAXINT, -1 b) not same, MAXINT, -MAXINT c) same , MAXUNIT, -1 d) same, MAXUNIT, MAXUNIT e) not same, MAXINT, MAXUNIT