What is the output of the following program?
#include
void swap(int m, int n)
{
int x = m;
m = n;
n = x;
}
main()
{
int x=5, y=3;
swap(x,y);
printf("%d %d", x, y);
}
Answer: B
5 3, call by value mechanism can’t alter actual arguments.
Enter details here
The variable declaration with no storage class specified is by default:
Answer: A
No answer description available for this question.
Enter details here
functions can return structure in c?
Answer: A
No answer description available for this question.
Enter details here
Is it true that too many recursive calls may result into stack overflow?
Answer: A
Yes, too many recursive calls may result into stack overflow. because when a function is called its return address is stored in stack.
After sometime the stack memory will be filled completely. Hence stack overflow error will occur.
Enter details here
What is the output of this C code?
int x = 5;
void main()
{
int x = 3;
printf("%d", x);
{
x = 4;
}
printf("%d", x);
}
Answer: D
No answer description available for this question.
Enter details here
What is the output of this C code?
void main()
{
m();
m();
}
void m()
{
static int x = 5;
x++;
printf("%d", x);
}
Answer: A
No answer description available for this question.
Enter details here
The output of the code below is
void m(int k)
{
printf("hi");
}
void m(double k)
{
printf("hello");
}
void main()
{
m(3);
}
Answer: C
No answer description available for this question.
Enter details here
Default storage class if not any is specified for a local variable, is auto:
Answer: A
No answer description available for this question.
Enter details here
Which function definition will run correctly?
Answer: B
No answer description available for this question.
Enter details here
A function may have any number of return statements each returning different values.
Answer: A
True, A function may have any number of return statements each returning different values and each return statements will not occur successively.
Enter details here