Programming and Technical - L3

Programming and Technical - L3

University

5 Qs

quiz-placeholder

Similar activities

cpp-while-loop

cpp-while-loop

University

10 Qs

Quiz 1- DEC20012

Quiz 1- DEC20012

University

10 Qs

C Loops

C Loops

University

10 Qs

Data structure

Data structure

University

5 Qs

Repaso programación en C

Repaso programación en C

University

10 Qs

C program

C program

University

10 Qs

Codigo with C

Codigo with C

University

10 Qs

PR EidP Quiz Seminar 3

PR EidP Quiz Seminar 3

University

6 Qs

Programming and Technical - L3

Programming and Technical - L3

Assessment

Quiz

Education

University

Hard

Created by

CSE CodeClub

Used 4+ times

FREE Resource

5 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

What will be the output of the following C code?

#include<stdio.h>

main()

{

int n;

n=f1(4);

printf("%d", n);

}

f1(int x)

{

int b;

if(x==1)

{

return 1;

}

else

{

b=x*f1(x-1);

return b;

}

}

24

4

12

10

2.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

What will be the output of the following C code?

#include<stdio.h>

void 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);

}

2, 3, 20 

3, 2, 15 

2, 1, 15

1, 2, 5

3.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

What will be the output of the following code snippet?

#include <stdio.h>

void solve() {

int a = 3;

int res = a++ + ++a + a++ + ++a;

printf("%d", res);

}

int main() {

solve();

return 0;

}

12

24

20

18

4.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

void main()

{

int sum=1, index=9;

do

{

index = index - 1;

sum *= 2;

}while( index > 9);

}

1

2

9

0.5

5.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

#include<stdio.h>

void main()

{

int i,j;

for(i=0,j=0;i<10,j<20;i++,j++)

{

printf("i=%d %t j=%d", i,j);

}

}

10 10

10 20

20 20

Error