psuedodode capgemini

psuedodode capgemini

University

25 Qs

quiz-placeholder

Similar activities

SMARTICUS

SMARTICUS

University

20 Qs

Microsoft Excel

Microsoft Excel

KG - Professional Development

20 Qs

kollekvium 3

kollekvium 3

University

20 Qs

Sistem Informasi Manajemen

Sistem Informasi Manajemen

University

20 Qs

Data Structure & Algo - Prelim Long Quiz

Data Structure & Algo - Prelim Long Quiz

University

21 Qs

Week 5: Test your understanding part 1

Week 5: Test your understanding part 1

University

20 Qs

DI (EM24) - Diseño de Perfiles (T5)

DI (EM24) - Diseño de Perfiles (T5)

University - Professional Development

20 Qs

unit-4-testing

unit-4-testing

University

20 Qs

psuedodode capgemini

psuedodode capgemini

Assessment

Quiz

Computers

University

Practice Problem

Medium

Created by

AMAN JOLLY

Used 175+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

25 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

1 What is the output of the code given below?


#include <stdio.h>

int main()

{

char ch = 'A';

printf("%d\n", ch);

return 0;

}

A

'A'

65

97

2.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

2 Which of the following is not a valid declaration in C?

1.short int x;

2.signed short x;

3.short x;

4.unsigned short x;

3 and 4

1

2

All are valid

3.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

3 What will be the output of the following code snippet?

#include <stdio.h>

int foo(int* a, int* b)

{

int sum = *a + *b;

*b = *a;

return *a = sum - *b;

}

int main()

{

int i = 0, j = 1, k = 2, l;

l = i++ || foo(&j, &k);

printf("%d %d %d %d", i, j, k, l);

return 0;

}

1 2 1 1

1 1 2 1

1 2 2 1

1 2 2 2

4.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

4 What is correct about the below program?

#include

<stdio.h>

int i;

int main()

{

if (i);

else

printf("Ëlse");

return 0;

}

if block is executed.

else block is executed

It is unpredictable as i is not initialized.

Error : misplaced else

5.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

5 Consider the following C function

void swap ( int x, int y )

{

int tmp;

tmp = x;

x = y;

y = tmp;

}

Call swap (a, b)

Call swap (&a, &b)

swap(a, b) cannot be used as it does not return any value

swap(a, b) cannot be used as the parameters passed by value

6.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

6 What will be the value of s if n=127?

Read n

i=0,s=0

Function Sample(int n)

while(n>0)

r=n%l0

p=8^i

s=s+p*r

i++

n=n/10

End While

Return s;

End Function

27

187

87

120

7.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

7 What will be the output of the following pseudocode?

Integer n

for (n = 3; n != 0; n--)

Print n

n = n-1

end for

3 1

3 2 1

3

Infinite Loop

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 Computers