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



what does the following function print? func(int i) { if(i%2)return 0; eale return 1..

Answer / fazlur rahaman naik & praneeth

the answer will b 1.

Is This Answer Correct ?    26 Yes 3 No

what does the following function print? func(int i) { if(i%2)return 0; eale return 1..

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

what does the following function print? func(int i) { if(i%2)return 0; eale return 1..

Answer / ravinderreddy

answer will be 0 not 1

Is This Answer Correct ?    11 Yes 3 No

what does the following function print? func(int i) { if(i%2)return 0; eale return 1..

Answer / shruti

if eale is else
and
int = 3 is int i = 3

then,

the answer is 1...

Is This Answer Correct ?    7 Yes 3 No

what does the following function print? func(int i) { if(i%2)return 0; eale return 1..

Answer / ravinderreddy

1 only

Is This Answer Correct ?    5 Yes 2 No

what does the following function print? func(int i) { if(i%2)return 0; eale return 1..

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

what does the following function print? func(int i) { if(i%2)return 0; eale return 1..

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

what does the following function print? func(int i) { if(i%2)return 0; eale return 1..

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

what does the following function print? func(int i) { if(i%2)return 0; eale return 1..

Answer / suresh reddy

Answer is 3

Is This Answer Correct ?    1 Yes 10 No

Post New Answer

More C Interview Questions

what is the difference between char * const and const char *?

2 Answers   TCS,


By using C language input a date into it and if it is right?

0 Answers   Aricent,


Write a C program to find the smallest of three integers, without using any of the comparision operators.

7 Answers   TCS,


Read two numbers from keyboard and find maximum of them?

1 Answers  


What are categories used for in c?

0 Answers  






When should structures be passed by values or by references?

0 Answers   Adobe,


What are the three constants used in c?

0 Answers  


What is the difference between memcpy and memmove?

0 Answers  


create an SINGLE LINKED LISTS and reverse the data in the lists completely

3 Answers  


What are the types of c language?

0 Answers  


write a program to swap bits in a character and return the value prototype of function char fun (char a, charb flag c) where fun returns a char, char a is a the value char b is the bit to be changed and flag c is the bit value for eg: x=fun(45,7,0) since 45 is 0010 0101 and ow x should contain the value 65 (0110 0101)

1 Answers   Bosch, College School Exams Tests,


write a programming in c language, 1 3 5 7 9 11

2 Answers   NIIT,


Categories