Vidyalelo
C Programming · all questions

C Miscellaneous
practice.

Practice every MCQ with options. Use Show answers when you want the correct option and solution.

70

Questions

4/4

Page

Pick an option on a question to see the right answer and solution.

What will be the output of the following C code if the input given to the code shown below is "examveda"?
#include<stdio.h>
#define NL '\n'
void main()
{
    void f(void);
    printf("enter the word\n");
    f();
}
void f(void)
{
    char c;
    if((c=getchar())!=NL)
    {
        f();
        printf("%c",c);
    }
    return;
}

Select an option to see the answer and solution.

A machine in which the least significant byte is stored in the smallest address is . . . . . . . .

Select an option to see the answer and solution.

What is the difference between the following 2 C codes?
#include <stdio.h> //Program 1
int main()
{
    int d, a = 1, b = 2;
    d =  a++ + ++b;
    printf("%d %d %d", d, a, b);
}

#include <stdio.h> //Program 2
int main()
{
    int d, a = 1, b = 2;
    d =  a++ +++b;
    printf("%d %d %d", d, a, b);
}

Select an option to see the answer and solution.

What will be the output of the following C code?
#include<stdio.h>
extern inline int min(int a, int b) 
{
  return a < b ? a : b;
}
main()
{
    int m;
    m=min(3,-5);
    printf("%d",m);
}

Select an option to see the answer and solution.

What will be the output of the following C code?
#include<stdio.h>
int main()
{
    signed char ch= ‘a’;
    printf(“%u”,ch);
    return 0;
}

Select an option to see the answer and solution.

What will be the output of the following C code?
#include <stdio.h>
void inline func1(char b[10]) 
{
    printf ("%c\n",b[2]);
}
int main() 
{
     func1("examveda");
     return 0;
}

Select an option to see the answer and solution.

Which of the following declaration is not supported by C language?

Select an option to see the answer and solution.

What will be the output of the following C code?
#include<stdio.h>
int main()
{
    int n=10;
    int f(int n);
    printf("%d",f(n));
}
int f(int n)
{
    if(n>0)
        return(n+f(n-2));
}

Select an option to see the answer and solution.

Iteration requires more system memory than recursion.

Select an option to see the answer and solution.

What will be the output of the following C code?
#include<stdio.h>
int main()
{
    printf("Hello");
    main();
    return 0;
}

Select an option to see the answer and solution.