what does the following function print?
func(int i)
{
if(i%2)return 0;
eale return 1;
}
main()
{
int =3;
i=func(i);
i=func(i);
printf("%d",i);}
Answers were Sorted based on User's Feedback
Answer / manju
The code returns error as i is undeclared see in main int
=3 and instead of else eale is used.
Is This Answer Correct ? | 13 Yes | 1 No |
Answer / shrinidhi
in the question in 'func' function there is a word 'eale'.
what u mean by that? if it is 'else' then the ans is "1".
Is This Answer Correct ? | 4 Yes | 2 No |
Answer / mahi
The code returns error as i is undeclared see in main
int =3 and
instead of
else eale is used.
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / anilkumar927@gmail.com
It gives errors and warring……….. those are as follows:
1) i is not declared in main function
2) Return type of func is not mentioned
3) eale is wrong in the func function
if every thing is correct in the QNS then
i hope that the ans is "zero"
Is This Answer Correct ? | 4 Yes | 4 No |
extern static int i func() { i =10; i++; printf("%d \n",i); } main() { i =20; printf("%d \n",i); func(); printf("%d \n",i); }
How can we open a file in Binary mode and Text mode?what is the difference?
Explain how does free() know explain how much memory to release?
Explain the ternary tree?
What is the meaning of typedef struct in c?
main() { printf("hello%d",print("QUARK test?")); }
What is a program flowchart and how does it help in writing a program?
how can f be used for both float and double arguments in printf? Are not they different types?
What does node * mean?
main() { int x, arr[8]={11,22,33,44,55,66,77,88}; x=(arr+2)[3]; printf(“%d”,x); }
# define prod(a,b)=a*b main() { int x=2; int y=3; printf("%d",prod(x+2,y-10)); } the output of the program is a.8 b.6 c.7 d.none
What are the different types of control structures in programming?