CodeChef (Secret Snippet)

Quiz
•
Computers
•
University
•
Hard
Dinesh D
Used 1+ times
FREE Resource
35 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 17 pts
int main()
{
int x = 1;
int y = 2;
if (!(x ^ y))
printf("yes");
else
printf("No);
return 0;
}
YES
NO
NONE
Compilation Error
2.
MULTIPLE CHOICE QUESTION
30 sec • 17 pts
int main()
{
int N = 5;
for (int i = 1; i <= N; i++) {
for (int j = 1; j <= N - i; j++)
printf(" ");
for (int j = 1; j < 2 * i; j++)
printf("*");
printf("\n");
}
return 0;
}
*********
*******
****
***
*
*
*
*
*
*
***
*****
*******
*********
None
3.
MULTIPLE CHOICE QUESTION
30 sec • 17 pts
What is the range of values that can be stored by int datatype in C?
A)-(2^31) to (2^31)-1
D)0 to (2^31)-1
C)-(2^63) to (2^63)-1
B)-256 to 255
4.
MULTIPLE CHOICE QUESTION
30 sec • 17 pts
How is an array initialized in C language?
B)int a={1,2,3}
A)int a[3]={1,2,3}
D)int a(3)=[1,2,3]
C)int a[]=new int[3]
5.
MULTIPLE CHOICE QUESTION
45 sec • 17 pts
What is the output of the following code snippet?
int main() {
int sum = 2 + 4 / 2 + 6 * 2;
printf("%d", sum);
return 0;
}
2
15
18
16
6.
MULTIPLE CHOICE QUESTION
30 sec • 17 pts
How is the 3rd element in an array accessed based on pointer notation?
C)*(*a+3)
B)*(a+3)
A)*a+3
D)&(a+3)
7.
MULTIPLE CHOICE QUESTION
30 sec • 17 pts
What does the following declaration indicate?
int x: 8;
C)Both A and B
D)None of the above
A)x stores a value of 8
B)x is an 8 bit integer
Create a free account and access millions of resources
Similar Resources on Wayground
30 questions
DFC20113 Programming Fundamentals Set B

Quiz
•
University
30 questions
Mid-Block Assessment

Quiz
•
University
40 questions
Informatika XII

Quiz
•
12th Grade - University
30 questions
แบบทดสอบหน่วยที่ 1-3 การเขียนโปรแกรมคอมพิวเตอร์

Quiz
•
University
30 questions
C quiz by Rachai

Quiz
•
5th Grade - University
30 questions
Computer Programming-2

Quiz
•
University
40 questions
Quizz PTS Kelas XI Struktur Data Array

Quiz
•
11th Grade - University
30 questions
Batch 2_Updated

Quiz
•
University
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

Interactive video
•
10th - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Computers
21 questions
Spanish-Speaking Countries

Quiz
•
6th Grade - University
20 questions
Levels of Measurements

Quiz
•
11th Grade - University
7 questions
Common and Proper Nouns

Interactive video
•
4th Grade - University
12 questions
Los numeros en español.

Lesson
•
6th Grade - University
7 questions
PC: Unit 1 Quiz Review

Quiz
•
11th Grade - University
7 questions
Supporting the Main Idea –Informational

Interactive video
•
4th Grade - University
12 questions
Hurricane or Tornado

Quiz
•
3rd Grade - University
7 questions
Enzymes (Updated)

Interactive video
•
11th Grade - University