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 |
Write a code of a general series where the next element is the sum of last k terms.
44.what is the difference between strcpy() and memcpy() function? 45.what is output of the following statetment? 46.Printf(“%x”, -1<<4); ? 47.will the program compile? int i; scanf(“%d”,i); printf(“%d”,i); 48.write a string copy function routine? 49.swap two integer variables without using a third temporary variable? 50.how do you redirect stdout value from a program to a file? 51.write a program that finds the factorial of a number using recursion?
What does != Mean in c?
What is function pointer and where we will use it
What is the advantage of a random access file?
What is the use of gets and puts?
Is there a way to compare two structure variables?
for(i=0;i=printf("Hello");i++); printf("Hello"); how many times how will be printed?????????
Is there sort function in c?
if function is declared as static in one source file, if I would like to use the same function in some other source file...is it possible....how ?
why programs in c are running with out #include<stdio.h>? some warnings are display in terminal but we execute the program we get answer why? eg: main() { printf("hello world "); }
Explain what happens if you free a pointer twice?