#include<stdio.h>
int fun();
int i;
int main()
{
while(i)
{
fun();
main();
}
printf("hello \n");
return 0;
}
int fun()
{
printf("hi");
}
answer is hello.how??wat is tat while(i) mean?
Answer Posted / sudhir kumar sharma
if we try this program in case of above program we will come
to a conclusion that all the variable declared before main
are global and assigned a value by default to zero that's
why the while loop will not executed in the above program :)
#include<stdio.h>
#include<conio.h>
int a;
float b;
double c;
char d;
static int e;
int main()
{
clrscr();
printf("%d\n %f\n %d\n %c\n %d\n",a,b,c,d,e);
getch();
return 0;
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
State the difference between realloc and free.
What does & mean in scanf?
Can stdout be forced to print somewhere other than the screen?
What is an endless loop?
Tell me about low level programming languages.
How to check whether string is a palindrome, WITHOUT USING STRING FUNCTIONS?
Explain how do you sort filenames in a directory?
Explain what does the function toupper() do?
How can a process change an environment variable in its caller?
What is New modifiers?
Where is c used?
1.int a=10; 2.int b=20; 3. //write here 4.b=30; Write code at line 3 so that when the value of b is changed variable a should automatically change with same value as b. 5.
Can we assign string to char pointer?
If I have a char * variable pointing to the name of a function ..
count = 0; for (i = 1;i < = 10; i++);count = count + i; Value of count after execution of the above statements will be a) 0 b) 11 c) 55 d) array