ExamVeda
Login
Home
81
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", 1[p], s[1]);
}
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
82
What will be the output of the following C code?
#include <stdio.h>
struct student
{
    int no;
    char name[20];
}
void main()
{
    struct student s;
    s.no = 8;
    printf("hello");
}
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
83
What will be the output of the following C code?
#include <stdio.h>
void main()
{
    int a[2][3] = {1, 2, 3, 4, 5};
    int i = 0, j = 0;
    for (i = 0; i < 2; i++)
    for (j = 0; j < 3; j++)
    printf("%d", a[i][j]);
}
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
84
What is the advantage of a multidimensional array over pointer array?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
85
What will be the output of the following C statement? (assuming the input is "cool brother in city")
printf(“%s\n”, argv[argc]);
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
86
What will be the output of the following C code?
#include <stdio.h>
int main()
{
    char a[2][6] = {"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
87
What will be the output of the following C code?
#include <stdio.h>
int main()
{
    char *str = "hello world";
    char strc[] = "good morning india\n";
    strcpy(strc, str);
    printf("%s\n", strc);
    return 0;
}
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
88
What will be the output of the following C code?
#include <stdio.h>
void m(int p)
{
    printf("%d\n", p);
}
void main()
{
    int a = 6, b = 5;
    m(a, b);
    printf("%d %d\n", a, b);
}
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
89
What will be the output of the following C code on a 32-bit system?
#include <stdio.h>
void main()
{
    char *a[10] = {"hi", "hello", "how"};
    printf("%d\n", sizeof(a));
}
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
90
What will be the output of the following C code?
#include <stdio.h>
int sub(int a, int b, int c)
{
    return a - b - c;
}
void main()
{
    int (*function_pointer)(int, int, int);
    function_pointer = ⊂
    printf("The difference of three numbers is:%d",
    (*function_pointer)(2, 3, 4));
}
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board