Programming Quiz

Programming Quiz

University

12 Qs

quiz-placeholder

Similar activities

Kuis Dadakan ;)

Kuis Dadakan ;)

10th Grade - University

15 Qs

Topic 4-2: Multiple if-else and switch-case

Topic 4-2: Multiple if-else and switch-case

University

10 Qs

6-文件操作

6-文件操作

University

10 Qs

1-基本数据类型

1-基本数据类型

University

10 Qs

Listen in Python

Listen in Python

University

10 Qs

Chap 1: What is a program made of?

Chap 1: What is a program made of?

University

13 Qs

cp06-01-1D-Array

cp06-01-1D-Array

University

10 Qs

DAA quiz2

DAA quiz2

University

15 Qs

Programming Quiz

Programming Quiz

Assessment

Quiz

Computers

University

Practice Problem

Hard

Created by

Sridhar Vemula

Used 3+ times

FREE Resource

AI

Enhance your content in a minute

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

12 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is the correct syntax for declaring a pointer in C?

int pointer x;

pointer int x;

int *x;

*int x;

2.

MULTIPLE SELECT QUESTION

45 sec • 1 pt

Which of the following is a correct way to pass an array to a function in C?

int function(int array[]);

int function(int *array);

int function(int &array);

int function(array[]);

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the output of the following code snippet?

#include <stdio.h>

int main() {

int x = 5;

printf("%d ", x++);

printf("%d", x);

return 0;

}

5 6

5 5

6 6

6 5

4.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What is the value of x after the following code executes?

int x = 10;

x = x << 2;


20

40

5

100

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What does this program prints?

#include <stdio.h>

int main() {

int arr[] = {1, 2, 3, 4, 5};

int *ptr = arr + 2;

printf("%d\n", *ptr);

return 0;

}

1

2

3

4

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

#include<stdio.h>

int main()

{

int a=2,b=7,c=10;

c=a==b;

printf("%d",c);

}

0

7

2

Compilation error

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What will the result of num1 variable after execution of the following statements?

int j = 1, num1 = 4;

while (++j <= 10)

{

num1++;

}

11

12

13

14

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