DS_A1 batch viva1 &2

DS_A1 batch viva1 &2

University

8 Qs

quiz-placeholder

Similar activities

Quiz Webinar GNS3

Quiz Webinar GNS3

10th Grade - University

13 Qs

El espacio geográfico y natural

El espacio geográfico y natural

KG - University

10 Qs

Instalacion de Equipos  #1

Instalacion de Equipos #1

9th Grade - University

13 Qs

Digital Pedagogies

Digital Pedagogies

10th Grade - University

10 Qs

cp06-01-1D-Array

cp06-01-1D-Array

University

10 Qs

CHAPTER 1: COMPUTER SECURITY REVIEW

CHAPTER 1: COMPUTER SECURITY REVIEW

University

10 Qs

1-基本数据类型

1-基本数据类型

University

10 Qs

8 - Организация работы в AutoCAD

8 - Организация работы в AutoCAD

University

13 Qs

DS_A1 batch viva1 &2

DS_A1 batch viva1 &2

Assessment

Quiz

Computers

University

Practice Problem

Easy

Created by

prapulla shivraj

Used 8+ times

FREE Resource

AI

Enhance your content in a minute

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

8 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following code snippet?

#include <stdio.h>
int main() {
	int a = 3, b = 5;
	int t = a;
	a = b;
	b = t;
	printf("%d %d", a, b);
	return 0;
}

5,3

3,5

3,3

5,5

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt


How is an array initialized in C language?

int a[3] = {1, 2, 3};

int a = {1, 2, 3};

int a[] = new int[3]

int a(3) = [1, 2, 3];


int a[3] = {1, 2, 3};
int a = {1, 2, 3};
int a[] = new int[3]
int a(3) = [1, 2, 3];

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following code snippet?

#include <stdio.h>
int main() {
	int a[] = {1, 2, 3, 4};
	int sum = 0;
	for(int i = 0; i < 4; i++) {
	    sum += a[i];
	}
	printf("%d", sum);
	return 0;
}


1

4

20

10

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How are String represented in memory in C?


An array of characters.

The object of some class.

Same as other primitive data types.

LinkedList of characters.

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following code snippet?

#include <stdio.h>
void solve() {
    int first = 10, second = 20;
    int third = first + second;
    {
        int third = second - first;
        printf("%d ", third);
    }
    printf("%d", third);
}
int main() {
	solve();
	return 0;
}

10 30

30 10

10 20

20 10

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Assuming int is of 4bytes, what is the size of int arr[15];?

60

30

15

4

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt


Which of the following statements should be used to obtain a remainder after dividing 3.14 by 2.1 ?

rem = fmod(3.14, 2.1);

rem = modf(3.14, 2.1);

Remainder cannot be obtain in floating point division.


rem = 3.14 % 2.1;

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?