
CP_Quiz_19Apr2023

Quiz
•
Computers
•
University
•
Hard
A M Abirami
Used 1+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE SELECT QUESTION
1 min • 1 pt
Identify the compilation errors in the given C program
& operator is missing in scanf()
Semicolon is used for the case label M, instead of colon
No single quote is used for the case label T
break statement is missing in second case block
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Guess the output correctly
A 65 65 A
A 65 65 65
A 65 A 65
Error
3.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
#include <stdio.h>
int main()
{
int x[ ][4] = {10, 20, 30, 40, 50, 60};
printf("%d \n %d", x[1][1], x[1][2]);
}
First it prints 60, then prints either 0 or Garbage value
Error, as array initialization is wrong
Prints 60 only
First it prints 40, then prints either 0 or Garbage value
4.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Assume the size of int is 4 bytes. if the base address of array is 4210, then the address of 7th element is __________
4234
4238
4230
4217
5.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
Identify the correct 1D, 2D array initialization
int a[ ] = {10, 20};
int a[ ][ ] = {10, 20};
int a[ ][2] = {10, 20};
int a[10] = {10, 20};
6.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
float array is initialized as follows: float x[ ] = {3.2, 2.3, 4.3, 3.4, 4}. Identify the option when the statement printf("%f",x[4]); is executed.
4.000000
4
Error, as float array cannot have int item
4.0
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Identify the Output when the given C code, containing the Bitwise Operation, is executed:
int main()
{
int a = 5;
int b = 6;
printf("%d %d", a & b, a | b);
}
4 7
7 4
0 1
Operations are Not possible
Create a free account and access millions of resources
Similar Resources on Wayground
6 questions
Part1 Array

Quiz
•
University
6 questions
Unit 12 : error no

Quiz
•
University
10 questions
C Program Array and strings

Quiz
•
University
10 questions
Arrays in C (II yr 02.07.2020)

Quiz
•
University
10 questions
pointers and structures

Quiz
•
University
15 questions
CIS1101-programming practice

Quiz
•
University
10 questions
C Viva

Quiz
•
University
13 questions
PRF192 C Programming

Quiz
•
University
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
10 questions
UPDATED FOREST Kindness 9-22

Lesson
•
9th - 12th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
US Constitution Quiz

Quiz
•
11th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
10 questions
Would you rather...

Quiz
•
KG - University
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)

Quiz
•
8th Grade - University
7 questions
Force and Motion

Interactive video
•
4th Grade - University
10 questions
The Constitution, the Articles, and Federalism Crash Course US History

Interactive video
•
11th Grade - University
7 questions
Figurative Language: Idioms, Similes, and Metaphors

Interactive video
•
4th Grade - University
20 questions
Levels of Measurements

Quiz
•
11th Grade - University
16 questions
Water Modeling Activity

Lesson
•
11th Grade - University
10 questions
ACT English prep

Quiz
•
9th Grade - University