ExamVeda
Login
Home
91
Which of the following declaration will result in run-time error?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
92
What will be the output of the following C code?
#include <stdio.h>
int main()
{
    char *a[2] = {"hello", "hi"};
    printf("%s", *(a + 1));
    return 0;
}
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
93
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
94
What will be the output of the following C code?
#include <stdio.h>
int main()
{
    char *p = NULL;
    char *q = 0;
    if (p)
        printf(" p ");
    else
        printf("nullp");
    if (q)
        printf("q\n");
    else
        printf(" nullq\n");
}
Discuss
Answer & Solution
Answer: Option A
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>
int main()
{
    int i = 97, *p = &i;
    foo(&i);
    printf("%d ", *p);
}
void foo(int *p)
{
    int j = 2;
    p = &j;
    printf("%d ", *p);
}
Discuss
Answer & Solution
Answer: Option A
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()
{
    int ary[2][3][4], j = 20;
    ary[0][0] = &j;
    printf("%d\n", *ary[0][0]);
}
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
97
What will be the output of the following C code?
#include <stdio.h>
void m(int *p, int *q)
{
    int temp = *p; *p = *q; *q = temp;
}
void main()
{
    int a = 6, b = 5;
    m(&a, &b);
    printf("%d %d\n", a, b);
}
Discuss
Answer & Solution
Answer: Option A
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 i = 97, *p = &i;
    foo(&p);
    printf("%d ", *p);
    return 0;
}
void foo(int **p)
{
    int j = 2;
    *p = &j;
    printf("%d ", **p);
}
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>
int main()
{
    void *p;
    int a[4] = {1, 2, 3, 8};
    p = &a[3];
    int *ptr = &a[2];
    int n = p - ptr;
    printf("%d\n", n);
}
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
100
Arguments that take input by user before running a program are called?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board