ExamVeda
Login
Home
41
Which of the following declaration is illegal?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
42
What will be the output of the following C code?
#include <stdio.h>
int mul(int a, int b, int c)
{
    return a * b * c;
}
void main()
{
    int (function_pointer)(int, int, int);
    function_pointer = mul;
    printf("The product of three numbers is:%d",
    function_pointer(2, 3, 4));
}
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
43
What will be the output of the following C code?
#include <stdio.h>
void main()
{
    int x = 0;
    int *ptr = &x;
    printf("%d\n", *ptr);
}
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
44
What is the maximum number of arguments that can be passed in a single function?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
45
What will be the output of the following C code?
#include <stdio.h>
int main()
{
    int ary[4] = {1, 2, 3, 4};
    int p[4];
    p = ary;
    printf("%d\n", p[1]);
}
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
46
What will be the output of the following C code?
#include <stdio.h>
int main()
{
    int *((*x)())[2];
    x();
    printf("after x\n");
}
int *((*x)())[2]
{
    int **str;
    str = (int*)malloc(sizeof(int)* 2);
    return str;
}
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
47
What will be the output of the following C code?
#include <stdio.h>
void main()
{
    int k = 5;
    int *p = &k;
    int **m  = &p;
    **m = 6;
    printf("%d\n", k);
}
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
48
What will be the output of the following C code?
#include <stdio.h>
int *f();
int main()
{
    int *p = f();
    printf("%d\n", *p);
}
int *f()
{
    int j = 10;
    return &j;
}
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
49
What will be the output of the following C code?
#include <stdio.h>
struct student
{
    int no;
    char name[20];
};
void main()
{
    student s;
    s.name = "hello";
    printf("hello");
}
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
50
Which of the following are generated from char pointer?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board