
psuedodode capgemini
Quiz
•
Computers
•
University
•
Practice Problem
•
Medium
AMAN JOLLY
Used 175+ times
FREE Resource
Enhance your content in a minute
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

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
20 questions
Berpikir Komputasi - Assessment 1
Quiz
•
University
20 questions
The Firm and Its Environment
Quiz
•
University
20 questions
Banco de Dados
Quiz
•
University - Professi...
20 questions
Quiz #1 RStudio
Quiz
•
University
20 questions
MIDTERM-SW3 MARKETING COMMUNICATION
Quiz
•
University
20 questions
System and network support and management
Quiz
•
11th Grade - Professi...
20 questions
C - Structures
Quiz
•
University
20 questions
DreamWeaver CS6
Quiz
•
University
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade
