
Pre-CA4

Quiz
•
Computers
•
University
•
Hard
Noob Code
FREE Resource
7 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Which of the following is true ?
gets() can read a string with newline characters but a normal scanf() with %s can not.
gets() can read a string with spaces but a normal scanf() with %s can not.
gets() can always replace scanf() without any additional code.
None of the Them.
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
#include <stdio.h>
int main()
{
int i = 3;
printf("%d", (++i)++);
return 0;
}
What is the output of the above program?
3
4
5
Compile-time error.
3.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Predict the output .
#include <stdio.h>
int main()
{
float c = 5.0;
printf ("Temperature in Fahrenheit is %.2f", (9/5)*c + 32);
return 0;
}
Temperature in Fahrenheit is 41.00
Temperature in Fahrenheit is 37.00
Temperature in Fahrenheit is 0.00
Compiler Error.
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the output of the below program?
#include <stdio.h>
int main()
{
int i = 0;
switch (i)
{
case '0': printf("Geeks");
break;
case '1': printf("Quiz");
break;
default: printf("GeeksQuiz");
}
return 0;
}
Geeks
Quiz
GeeksQuiz
Compile-time error.
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
#include <stdio.h>
#define a 10
int main()
{
printf("%d ",a);
#define a 50
printf("%d ",a);
return 0;
}
Output ?
Compiler Error
10 50
50 50
10 10
6.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Predict output of following program
#include <stdio.h>
int main()
{
int i;
int arr[5] = {1};
for (i = 0; i < 5; i++)
printf("%d ", arr[i]);
return 0;
}
1 followed by four garbage values
1 0 0 0 0
1 1 1 1 1
0 0 0 0 0
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
# include <stdio.h>
int main()
{
char str1[] = "GeeksQuiz";
char str2[] = {'G', 'e', 'e', 'k', 's', 'Q', 'u', 'i', 'z'};
int n1 = sizeof(str1)/sizeof(str1[0]);
int n2 = sizeof(str2)/sizeof(str2[0]);
printf("n1 = %d, n2 = %d", n1, n2);
return 0;
}
What is the output of following program?
n1 = 10, n2 = 9
n1 = 10, n2 = 10
n1 = 9, n2 = 9
n1 = 9, n2 = 10
Similar Resources on Wayground
10 questions
Basics Of C Programming

Quiz
•
University
9 questions
c language quiz

Quiz
•
University
10 questions
C basic

Quiz
•
University
7 questions
Union in c 10

Quiz
•
University
12 questions
C/C++ C Function

Quiz
•
University
8 questions
Unit 2 : Operators

Quiz
•
University
7 questions
unit 4 : loops

Quiz
•
University
10 questions
C - Pointers

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