ExamVeda
Login
Home
91
What will be the output of the following C code?
#include <stdio.h>
void main()
{
    char a[10][5] = {"hi", "hello", "fellows"};
    printf("%s", a[2]);
}
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
92
What will be the output of the following C code (considering sizeof char is 1 and pointer is 4)?
#include <stdio.h>
int main()
{
    char *a[2] = {"hello", "hi"};
    printf("%d", sizeof(a));
    return 0;
}
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
93
In linux, argv[0] by command-line argument can be occupied by . . . . . . . .
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
94
What will be the output of the following C code?
#include <stdio.h>
int main()
{
    char *p[1] = {"hello"};
    printf("%s", (p)[0]);
    return 0;
}
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
95
What will be the output of the following C code?
#include <stdio.h>
void main()
{
    int a[3] = {1, 2, 3};
    int *p = a;
    int *r = &p;
    printf("%d", (**r));
}
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
96
What will be the output of the following C code?
#include <stdio.h>
int main()
{
    char *str = "hello world";
    char strary[] = "hello world";
    printf("%d %d\n", sizeof(str), sizeof(strary));
    return 0;
}
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
97
An array of similar data types which themselves are a collection of dissimilar data type are . . . . . . . .
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
98
What will be the output of the following C code?
#include <stdio.h>
int main()
{
    int a[4] = {1, 2, 3, 4};
    int b[4] = {1, 2, 3, 4};
    int n = &b[3] - &a[2];
    printf("%d\n", n);
}
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
99
What will be the output of the following C code?
#include <stdio.h>
void f(int a[][3])
{
    a[0][1] = 3;
    int i = 0, j = 0;
    for (i = 0; i < 2; i++)
    for (j = 0; j < 3; j++)
    printf("%d", a[i][j]);
}
void main()
{
    int a[2][3] = {0};
    f(a);
}
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
100
What will be the output of the following C code?
#include <stdio.h>
void (*(f)())(int, float);
typedef void (*(*x)())(int, float);
void foo(int i, float f);
int main()
{
    x = f;
    x();
}
void (*(f)())(int, float)
{
    return foo;
}
void foo(int i, float f)
{
    printf("%d %f\n", i, f);
}
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board