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
15 questions
bootstrap let's play
Quiz
•
University
12 questions
Porcentajes
Quiz
•
University
10 questions
Java Quiz 1
Quiz
•
University
10 questions
Web-II-Loop and Function
Quiz
•
University
15 questions
HTML is FuN! 2
Quiz
•
10th Grade - University
15 questions
Fundamentos de HTML
Quiz
•
University
11 questions
QUIZ IN TTL: QUIZIZZ
Quiz
•
University
11 questions
Egzaminas
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
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
