DEADLOCK

Master C and Java Programming
Test your knowledge and skills in programming languages like C and Java with this comprehensive quiz. Designed for enthusiasts and students alike, this quiz covers various topics and challenges you to think critically.
Key Features:
- 12 engaging multiple-choice questions
- Focus on C and Java programming concepts
- Perfect for testing your programming skills before interviews
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;
#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
10
20
How are String represented in memory in C?
An array of Character
The object of some class
LinkedList of Characters
Same as other primitive data types
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;
}
#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
What will be the output of the following code snippet?
#include <stdio.h>
void solve() {
int a = 3;
int res = a++ + ++a + a++ + ++a;
printf("%d", res);
}
int main() {
solve();
return 0;
}
#include <stdio.h>
void solve() {
int a = 3;
int res = a++ + ++a + a++ + ++a;
printf("%d", res);
}
int main() {
solve();
return 0;
}
12
24
20
18
In which of the following languages is function overloading not possible?
C
C++
Java
Python
Which of the following are correct file opening modes in C?
R
Rb
W
All of these above
None of these
r and rb
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;
}
#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 these
What will be the output of the following code snippet?
#include <stdio.h>
#define VAL 3 * (2 + 6)
void solve() {
int a = 10 + VAL;
printf("%d", a);
}
int main() {
solve();
return 0;
}
#include <stdio.h>
#define VAL 3 * (2 + 6)
void solve() {
int a = 10 + VAL;
printf("%d", a);
}
int main() {
solve();
return 0;
}
104
24
10
34
Which of the following option leads to the portability and security of Java?
Dynamic binding between objects
Use of exception handling
The applet makes the Java code secure and portable
Bytecode is executed by JVM
Evaluate the following Java expression, if x=3, y=5, and z=10:
++z + y - y + z + x++
++z + y - y + z + x++
24
23
20
25
Which of the following for loop declaration is not valid?
For ( int I = 99; I >= 0; I / 9 )
For ( int I = 2; I <= 20; I = 2* I )
For ( int I = 20; I >= 2; - -i )
For ( int I = 7; I <= 77; I += 7 )
Which of the following is the correct syntax of including a user defined header files in C++?
#include<userdefined>
#include<userdefined.h>
#include âuserdefinedâ
#include [userdefined]
{"name":"DEADLOCK", "url":"https://www.supersurvey.com/QPREVIEW","txt":"Test your knowledge and skills in programming languages like C and Java with this comprehensive quiz. Designed for enthusiasts and students alike, this quiz covers various topics and challenges you to think critically.Key Features:12 engaging multiple-choice questionsFocus on C and Java programming conceptsPerfect for testing your programming skills before interviews","img":"https:/images/course1.png"}
More Surveys
Programming Background Knowledge
6317
Quiz Poll, Lecture 1
8467
Entity Relationship Lecture
10537
9-Basic Programming
331623
Mivane
8417
Is extra python training needed/wanted?
6318
Tech-Cult : The CSEian's Club
4251
Subject Preferences
3229
Computer Science
6347
Feedback form Competitive Programming
6329
Technology Usage
9430
Progress so far
13614
Make your own Survey
- it's free to start.
- it's free to start.