C LANGUAGE A

C LANGUAGE A

University

20 Qs

Similar activities

Computer Science - Exam 1

Computer Science - Exam 1

University

15 Qs

Extra-episodio 1

Extra-episodio 1

KG - University

19 Qs

Penalaran Umum

Penalaran Umum

12th Grade - University

20 Qs

ANTONIM SINONIM

ANTONIM SINONIM

University

20 Qs

CLC Stage 1

CLC Stage 1

6th Grade - University

20 Qs

IT Computer Science Chapter 2 Quiz

IT Computer Science Chapter 2 Quiz

5th Grade - University

20 Qs

C Program

C Program

University

20 Qs

UAS Praktikum Dasar Pemrograman

UAS Praktikum Dasar Pemrograman

University

15 Qs

C LANGUAGE A

C LANGUAGE A

Assessment

Quiz

Created by

sathwik jilla

World Languages

University

3 plays

Hard

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

How many times while loop conditions will execute if i is initialised to 0 in both cases

while(i<n)

i++;

-------

do

i++;

while(i<=n);

n,n

n,n+1

n+1,n

n+1,n+1

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What will be the output of the following C code?

#define HELLO(a) #a

main()

{

printf(HELLO(good morning));

}

good morning

goodmorning

Option 3

error

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What will be the size of the following C structure?

#include <stdio.h>

struct temp

{

int a[10];

char p;

};

5

11

41

44

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What will be the output of the following code?

#include<stdio.h>

int foo();

int main()

{

int i=foo();

}

foo()

{

printf("2 ");

return 2;

}

2

compile time error

Depends on the compiler

Depends on the standard

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What will be the output of the following code?

#include<stdio.h>

struct test

{

int i;

char j;

};

main()

{

printf("%d",sizeof(struct test));

}

Error

1

4

8

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What will be the output of the following code?

#include<stdio.h>

void main(){

int k;

for(k= -3;k<-5;k++)

printf("Hello");

}

Hello

infinite hello

Runtime error

Nothing

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What will be output of the following code?

#pragma(1)

struct test

{

int i;

char j;

};

main()

{

printf("%d",sizeof(struct test));

}

1

8

Error

4

8.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What will be the output of the following C code?

#define F abc

#define B def

#define FB(arg) #arg

#define FB1(arg) FB(arg)

main()

{

printf(FB(F B));

FB1(F B);

}

F B

Error

FB

"FB"

9.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What will be the output of the following code?

#include<stdio.h>

void m(int p,int q)

{

int temp=p;

p=q;

q=temp;

}

void main()

{

int a=6,b=5;

m(a,b);

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

}

5 6

6 5

5 5

6 6

10.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What will be the output of the following code?

void main()

{

int i=5,k;

if(i==0)

goto label;

label:printf("%d", i);

printf("Hey");

}

5

Hey

5Hey

Nothing

Explore all questions with a free account

or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?