CP_Quiz_19Apr2023

CP_Quiz_19Apr2023

University

10 Qs

quiz-placeholder

Similar activities

Programmeerimiskeeled

Programmeerimiskeeled

10th Grade - University

12 Qs

Functions & Scope of variables in C++

Functions & Scope of variables in C++

11th Grade - University

15 Qs

C Wrapup Quiz Deutsch

C Wrapup Quiz Deutsch

University

12 Qs

Operators in C

Operators in C

University

6 Qs

C Basics

C Basics

University

12 Qs

QUIZ MASTERY SHOWDOWN 1ST YEAR SET 2

QUIZ MASTERY SHOWDOWN 1ST YEAR SET 2

University

15 Qs

UAS Logika dan Algoritma Pemrograman

UAS Logika dan Algoritma Pemrograman

1st Grade - University

15 Qs

Week 9 - Functions and Pointers

Week 9 - Functions and Pointers

University

14 Qs

CP_Quiz_19Apr2023

CP_Quiz_19Apr2023

Assessment

Quiz

Computers

University

Hard

Created by

A M Abirami

Used 1+ times

FREE Resource

10 questions

Show all answers

1.

MULTIPLE SELECT QUESTION

1 min • 1 pt

Media Image

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

Media Image

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

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?