TECHNICAL C PROGRAM
Quiz
•
Computers
•
University
•
Hard
GOWSIKRAJA P
Used 131+ times
FREE Resource
Enhance your content in a minute
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
int main() { unsigned int i=65000; while ( i++ != 0 ); printf("%d",i); return 0; }
PREDICT THE OUTPUT OR ERROR
1
2
3
SYNTAX ERROR
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
#include <stdio.h>
int main() {
short i;
for (i = 1; i >= 0; i++)
printf("%d\n", i);
}
STATE THE OUTPUT
The control won’t fall into the for loop
Numbers will be displayed until the signed limit of short and throw a runtime error
Numbers will be displayed until the signed limit of short and program will successfully terminate
This program will get into an infinite loop and keep printing numbers with no errors
3.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
#include <stdio.h>
void main() {
int array[30], temp[30], i, j, k, l, num; //using 2 arrays
printf("Enter the number of lines to be printed: "); scanf("%d", &num);
temp[0] = 1;
array[0] = 1;
for (j = 0; j < num; j++)
printf(" "); printf(" 1\n");
for (i = 1; i < num; i++)
{ for (j = 0; j < i; j++)
printf(" ");
for (k = 1; k < num; k++)
{ array[k] = temp[k - 1] + temp[k];
} array[i] = 1; for (l = 0; l <= i; l++)
{ printf("%3d", array[l]);
temp[l] = array[l];
} printf("\n");
}
}
Enter the number of lines to be printed: 4
1
1 1
1 2 1
1 3 3 1
Enter the number of lines to be printed: 4
1
1 1
1 1 1
1 1 1 1
Enter the number of lines to be printed: 4
*
* *
* * *
* * * *
Enter the number of lines to be printed: 4
1
2 2
3 3 3
4 4 4 4
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
void main() { char a = 'a'; int x = (a % 10)++; printf("%d\n", x); }
GUESS THE OUTPUT
Grabage Value
Compiler Error
Output: 10
Output: 0
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
#include <stdio.h>
void main() {
int k = 0;
for (k < 3; k++)
printf("Hello");
}
Compile time error
Hello is printed thrice
Nothing
Varies
6.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
#include <stdio.h>
void main()
{
double k = 0;
for (k = 0.0; k < 3.0; k++)
printf("Hello");
}
Run time error
Hello is printed thrice
Hello is printed twice
Hello is printed infinitely
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
#include <stdio.h>
int main() {
int i = 0;
for (; ; ;)
printf("In for loop\n");
printf("After loop\n");
}
a) Compile time error
b) Infinite loop
c) After looP
d) Undefined behaviour
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
13 questions
GIT COURSE
Quiz
•
University
12 questions
UTS Semester 1 Informatika 2024/2025
Quiz
•
8th Grade - University
15 questions
SENATIC Parcial Guía 3_PseInt
Quiz
•
10th Grade - University
10 questions
T02: Python - The Basics
Quiz
•
University
15 questions
LATIHAN SOAL PEMROGRAMAN
Quiz
•
9th Grade - University
10 questions
Clustering_Pertemuan2_Quiz_Ceria
Quiz
•
University
10 questions
INTRODUCCION A LA PROGRAMACION
Quiz
•
6th Grade - University
10 questions
2025 python class first quiz
Quiz
•
9th Grade - 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
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
20 questions
Figurative Language Review
Quiz
•
6th Grade
