ExamVeda
Login
Home
61
What will be the output of the following C code?
#include <stdio.h>
void main()
{
    char *s = "hello";
    char *p = s * 3;
    printf("%c\t%c", *p, s[1]);
}
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
62
Which of the following operation is possible using a pointer char? (Assuming the declaration is char *a;)
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
63
Comment on the following C statement.
int (*a)[7];
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
64
What will be the output of the following C code?
#include <stdio.h>
int main()
{
    int *p = (int *)2;
    int *q = (int *)3;
    printf("%d", p + q);
}
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
65
Which of the following statements are true?
P. Pointer to Array
Q. Multi-dimensional array
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
66
What will be the output of the following C code?
#include <stdio.h>
void main()
{
    char *s= "hello";
    char *p = s;
    printf("%c\t%c", p[0], s[1]);
}
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
67
What will be the output of the following C code (run without any command line arguments)?
#include <stdio.h>
int main(int argc, char *argv[])
{
    while (argc--)
    printf("%s\n", argv[argc]);
    return 0;
}
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
68
What will be the output of the following C code?
#include <stdio.h>
int main()
{
    int a[4] = {1, 2, 3, 4};
    int *p = &a[1];
    int *ptr = &a[2];
    ptr = ptr * 1;
    printf("%d\n", *ptr);
}
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
69
What will be the output of the following C code?
#include <stdio.h>
void f(char *k)
{
    k++;
    k[2] = 'm';
}
void main()
{
    char s[] = "hello";
    f(s);
    printf("%c\n", *s);
}
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
70
Which of the following is not possible statically in C?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board