
Pre-CA4
Authored by Noob Code
Computers
University

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
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
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
10 questions
Condicionales en Racket
Quiz
•
University
12 questions
O que vamos aprender?
Quiz
•
1st Grade - University
10 questions
Selection Control Structure Quiz
Quiz
•
6th Grade - University
10 questions
Soal SKD
Quiz
•
University - Professi...
12 questions
Porcentajes
Quiz
•
University
10 questions
Java Quiz 1
Quiz
•
University
10 questions
Web-II-Loop and Function
Quiz
•
University
11 questions
Workshop_1
Quiz
•
University
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
54 questions
Analyzing Line Graphs & Tables
Quiz
•
4th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade