Search Header Logo

C Quiz 4_M

Authored by SAI KRISHNA

Computers

University

Used 2+ times

C Quiz 4_M
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Q. Predict the Output:

#include <stdio.h>

int main()

{

    char ch;

    if(ch=printf(""))

         printf("It matters\n");

    else

         printf("It doesn't matters\n");

    return 0;

}

It doesn’t matters

It matters

Error

None

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Q. Predict the output

#include <stdio.h>

int main()

{

    int a[5]= {5,1,15,20,25};

    int i,j,m;

    i= ++a[1];

    j= a[1]++;

    m= a[i++];

    printf("%d,%d,%d",i,j,m);

    return 0;

}

3,2,15

2,2,15

3,3,15

Error

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Q. Predict the Output:

#include <stdio.h>

int main()

{

  int a=b=c=10;

  a=b=c=50;

  printf("\n %d %d %d",a,b,c);

    return 0;

}

10 10 10

50 50 50

Error

None

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Q.Predict the Output

#include <stdio.h>

int main()

{

   int x[]= { 10,20,30,40,50};

   printf("\n %d %d %d %d  %d",     x[4],3[x],x[2],1[x],x[0]);

    return 0;

}

50 40 30 20 10

Error

50 GV 30 GV 10

None

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Q. Predict the output

#include <stdio.h>

int main()

{

  int i;

  i= 0x10;

  printf("\n x= %d",i);

    return 0;

}

x = 16

x = 10

Error

x = 0

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Q. Predict the Output:

#include <stdio.h>

#define square(x) x*x

int main()

{

    printf("\n square = %d", square(10+2));

    return 0;

}

Square=32

Square=144

Square = 152

Error

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Q.Predict the output:

#include <stdio.h>

int main()

{

   int x;

   x= printf("I See, Sea in C");

   printf("\nx = %d",x);

    return 0;

}

I See, Sea in C

x = 15

x = 15

Error

I See, Sea in C

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?