
DS_A1 batch viva1 &2

Quiz
•
Computers
•
University
•
Easy
prapulla shivraj
Used 8+ times
FREE Resource
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];
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;
8.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
what is the outpuWhich of the following is the correct order of evaluation for the below expression?
z = x + y * z / 4 % 2 - 1t of the following code snippet
* / % + - =
= * / % + -
/ * % - + =
* % / - + =
Similar Resources on Wayground
10 questions
exception

Quiz
•
University
10 questions
Array in C

Quiz
•
University
13 questions
C programming-1

Quiz
•
University
10 questions
Arrays

Quiz
•
11th Grade - University
11 questions
Basics of JAVA

Quiz
•
University
10 questions
C_ QUIZ1

Quiz
•
University
10 questions
Input And Output in C

Quiz
•
University
10 questions
Chapter 1: Python Overview

Quiz
•
University
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)

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

Interactive video
•
4th Grade - University
36 questions
Unit 5 Key Terms

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

Interactive video
•
4th Grade - University
15 questions
Properties of Equality

Quiz
•
8th Grade - University
38 questions
WH - Unit 3 Exam Review*

Quiz
•
10th Grade - University
21 questions
Advise vs. Advice

Quiz
•
6th Grade - University
12 questions
Reading a ruler!

Quiz
•
9th Grade - University