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);}
Answer Posted / 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 |
Post New Answer View All Answers
Give me the code of in-order recursive and non-recursive.
What do you mean by dynamic memory allocation in c?
Explain the difference between strcpy() and memcpy() function?
How do I determine whether a character is numeric, alphabetic, and so on?
Is null valid for pointers to functions?
What is the difference between struct and typedef struct in c?
List a few unconditional control statement in c.
An integer that indentifies the position of a data item in a sequence of data items a) value b) number c) index d) all of the above
What is a double c?
Write a program to check palindrome number in c programming?
Can main () be called recursively?
Can you please explain the difference between exit() and _exit() function?
When should we use pointers in a c program?
The purpose of this exercise is to benchmark file writing and reading speed. This exercise is divided into two parts. a). Write a file character by character such that the total file size becomes approximately >10K. After writing close the file handler, open a new stream and read the file character by character. Record both times. Execute this exercise at least 4 times b). Create a buffer capable of storing 100 characters. Now after generating the characters, first store them in the buffer. Once the buffer is filled up, store all the elements in the file. Repeat the process until the total file size becomes approximately >10K.While reading read a while line, store it in buffer and once buffer gets filled up, display the whole buffer. Repeat the exercise at least 4 times with different size of buffer (50, 100, 150 …). Records the times. c). Do an analysis of the differences in times and submit it in class.
Why does not c have an exponentiation operator?