Search Header Logo

Programming and Technical - L3

Authored by CSE CodeClub

Education

University

Used 4+ times

Programming and Technical - L3
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

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

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?

Discover more resources for Education