C Language Test 3

Quiz
•
Computers
•
Professional Development
•
Hard
Divakar Bangaru
Used 3+ times
FREE Resource
25 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In which of the following languages is function overloading not possible?
C
C++
Java
Python
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following function is used to open a file in C++?
fopen
fclose
fseek
fgets
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following are correct file opening modes in C?
r
rb
w
All of the above.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the return type of the fopen() function in C?
Pointer to a FILE object.
Pointer to an integer.
An integer.
An integer.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code snippet?
#include <stdio.h>
void solve() {
int ch = 2;
switch(ch) {
case 1: printf("1 ");
case 2: printf("2 ");
case 3: printf("3 ");
default: printf("None");
}
}
int main() {
solve();
return 0;
}
1 2 3 None
2
2 3 None
None
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code snippet?
#include <stdio.h>
void solve() {
int x = 1, y = 2;
printf(x > y ? "Greater" : x == y ? "Equal" : "Lesser");
}
int main() {
solve();
return 0;
}
Greater
Lesser
Equal
None of the above.
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code snippet?
#include <stdio.h>
void solve() {
int n = 24;
int l = 0, r = 100, ans = n;
while(l <= r) {
int mid = (l + r) / 2;
if(mid * mid <= n) {
ans = mid;
l = mid + 1;
}
else {
r = mid - 1;
}
}
printf("%d", ans);
}
int main() {
solve();
return 0;
}
5
4
3
6
Create a free account and access millions of resources
Similar Resources on Wayground
20 questions
Dev Web Java / Angular

Quiz
•
Professional Development
21 questions
БимБам♥

Quiz
•
Professional Development
20 questions
C++ Programming Quiz

Quiz
•
Professional Development
30 questions
Blind Coding Round 1

Quiz
•
Professional Development
20 questions
GIM-1 E1

Quiz
•
Professional Development
20 questions
VCE TalentNext-2021 Quiz-2

Quiz
•
Professional Development
20 questions
Round-1 Technical Aptitude

Quiz
•
11th Grade - Professi...
25 questions
Java Basics

Quiz
•
Professional Development
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