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 / fazlur rahaman naik & praneeth
the answer will b 1.
| Is This Answer Correct ? | 26 Yes | 3 No |
Post New Answer View All Answers
What is NULL pointer?
What is the difference between printf and scanf )?
What is the significance of c program algorithms?
How can I write a function analogous to scanf?
What are types of structure?
What is meant by type specifiers?
Given only putchar (no sprintf, itoa, etc.) write a routine putlong that prints out an unsigned long in decimal. [ I gave the obvious solution of taking % 10 and / 10, which gives us the decimal value in reverse order. This requires an array since we need to print it out in the correct order. The interviewer wasn't too pleased and asked me to give a solution which didn't need the array ].
What is time complexity c?
Why is c still so popular?
In this assignment you are asked to write a multithreaded program to find the duplicates in an array of 10 million integers. The integers are between -5000,000 to 5000,000 and are generated randomly. Use 10 threads, each thread works on 1000,000 integers. Compare the time needed to accomplish the task with single thread of execution program. Do not include the time to fill the array with integers in the execution time.
How can type-insensitive macros be created?
What is a null pointer in c?
How is null defined in c?
Write a program to print fibonacci series using recursion?
Explain what is the difference between a string and an array?