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 |
Display names and numbers of employees who have 5 years or more experience and salary less than Rs.15000 using array of structures (name, number, experience and salary)
Which of the following are valid "include" formats? A)#include and #include[file.h] B)#include (file.h) and #include C)#include [file.h] and #include "file.h" D)#include <file.h> and #include "file.h"
implement general tree using link list
9.how do you write a function that takes a variable number of arguments? What is the prototype of printf () function? 10.How do you access command-line arguments? 11.what does ‘#include<stdio.h>’ mean? 12.what is the difference between #include<> and #include”…”? 13.what are # pragma staments? 14.what is the most appropriate way to write a multi-statement macro?
main() { char *ptr = "Ramco Systems"; (*ptr)++; printf("%s\n",ptr); ptr++; printf("%s\n",ptr); } Find the Outputs?
What does typeof return in c?
What is d scanf?
How can I prevent other programmers from violating encapsulation by seeing the private parts of my class?
Is c still relevant?
How a string is stored in c?
Is it better to bitshift a value than to multiply by 2?
Explain modulus operator. What are the restrictions of a modulus operator?