T&P Test on MCQs

T&P Test on MCQs

Professional Development

10 Qs

quiz-placeholder

Similar activities

Day 2 C Programming quiz

Day 2 C Programming quiz

Professional Development

10 Qs

Functions on C

Functions on C

Professional Development

15 Qs

Day 5 C Programming Quiz

Day 5 C Programming Quiz

Professional Development

10 Qs

Recursion

Recursion

Professional Development

10 Qs

Introduction

Introduction

Professional Development

10 Qs

C Programming Lab-18.05.21-Quiz1

C Programming Lab-18.05.21-Quiz1

Professional Development

10 Qs

Day 3 C Programming quiz

Day 3 C Programming quiz

Professional Development

10 Qs

MindSpace Computers C Quiz-1 2025

MindSpace Computers C Quiz-1 2025

Professional Development

13 Qs

T&P Test on MCQs

T&P Test on MCQs

Assessment

Quiz

Computers

Professional Development

Hard

Created by

BHASKAR ADEPU

Used 3+ times

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

#include<stdio.h>

  

void main()

{

    int x = 20;

int *y;

      

    // Assume address of x is 500 and  integer is 4 byte size 

    y = &x; 

     *y++; 

     x++;

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

   }

x=21, y=504

x=21, y=506

x=21, y=508

x=21, y=510

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the output of the following C code?

#include <stdio.h>

void main() {

int arr[2][3];

arr[][]={{1, 2, 3}, {4, 5, 6}};

printf("%d\n", arr[1][0]);

}

2

1

4

Compilation Error

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the output of the following code?

int c=1;

while(c)

{

printf("Hello");

c--;

if(!c) printf("KITSW");

else printf("END");

}

Hello infinite times printed

HelloKITSW

HelloKITSWEND

Hello

KITSW

END

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the output of the following nested for loop?

int i, j;

for(i=0;i<4;++i)

{

for(j=i;j<=i;j++)

{

printf("%d %d\n", j, i);

if(j==2) break;

}

}

1

2

3

4

0 0

1 1

3 3

4 4

0 1

1 0

1 1

3 3

0 0

1 1

2 2

3 3

5.

FILL IN THE BLANK QUESTION

1 min • 1 pt

struct {

    short s[5];

    union {

         float y;

         long z;

    }u;

} t;

Assume that the data types short, float and long occupy 2 bytes, 4 bytes and 8 bytes, respectively. The memory requirement for variable t, ignoring alignment considerations, is _________bytes.

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which of the following is not a storage class specifier in C?

auto

register

extern

static

volatile

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What will be the output of the following C code?


  1. #include <stdio.h>

  2. int main()

  3. {

  4. foo();

  5. foo();

  6. }

  7. void foo()

  8. {

  9. int i = 11;

  10. printf("%d ", i);

  11. static int j = 12;

  12. j = j + 1;

  13. printf("%d\n", j);

  14. }

11 12 11 12

11 13 11 14

11 12 11 13

Compile time error

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?