
c coding round 2
Quiz
•
Arts
•
1st Grade
•
Hard
Nagendrapatel Puppala
Used 2+ times
FREE Resource
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What will be the output of the following C code?
#include <stdio.h>
void main()
{
float x = 0.1;
printf("%d, ", x);
printf("%f", x);
}
0.100000, junk value
Junk value, 0.100000
0, 0.100000
0, 0.999999
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
int x=1;
double y= 0.5 * (exp (x) + exp (-x));
cos(x)
cosh(x)
fmod(x)
modf(x)
3.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What will be the output of the following C code if the system time is 1:52 PM (Sunday)?
#include<stdio.h>
#include<time.h>
int main()
{
struct tm *ptr;
time_t t;
char str[100];
t = time(NULL);
ptr = localtime(&t);
strftime(str,100,"%I",ptr);
puts(str);
return 0;
}
error
01
1
13
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the meaning of the following C code if output is 0?
#include<stdio.h>
#include<time.h>
int main()
{
struct tm *local;
time_t t;
t=time(NULL);
local=localtime(&t);
printf("%d",local->tm_isdst);
return 0;
}
DST is in effect
DST status is unknown
DST is not in effect
DST is corresponding with local time
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What will be the output of the following C code?
#include <stdio.h>
void main()
{
register int x = 0;
if (x < 2)
{
x++;
main();
}
}
Segmentation fault
main is called twice
main is called once
main is called thrice
6.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What will be the output of the following C code?
#include <stdio.h>
struct point
{
int x;
int y;
};
void foo(struct point*);
int main()
{
struct point p1[] = {1, 2, 3, 4};
foo(p1);
}
void foo(struct point p[])
{
printf("%d\n", p[1].x);
}
compile error
1
3
2
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What will be the output of the following C code?
#include <stdio.h>
void main()
{
float x;
int y;
printf("enter two numbers \n");
scanf("%f %f", &x, &y);
printf("%f, %d", x, y);
}
7.000000, 7
Run time error
7.000000, junk
Varies
Create a free account and access millions of resources
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
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?
Similar Resources on Wayground
20 questions
DT-SOK-FP
Quiz
•
1st - 3rd Grade
20 questions
112學年度-五年級音樂期中測驗
Quiz
•
1st - 5th Grade
20 questions
java 4
Quiz
•
1st Grade
16 questions
英语考试
Quiz
•
1st - 5th Grade
20 questions
java 3
Quiz
•
1st Grade
20 questions
NHANH NHƯ CHỚP NHÍ VÒNG 6
Quiz
•
1st Grade
20 questions
cùng vẽ
Quiz
•
1st Grade
Popular Resources on Wayground
10 questions
Honoring the Significance of Veterans Day
Interactive video
•
6th - 10th Grade
10 questions
Exploring Veterans Day: Facts and Celebrations for Kids
Interactive video
•
6th - 10th Grade
19 questions
Veterans Day
Quiz
•
5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
15 questions
Circuits, Light Energy, and Forces
Quiz
•
5th Grade
6 questions
FOREST Self-Discipline
Lesson
•
1st - 5th Grade
7 questions
Veteran's Day
Interactive video
•
3rd Grade
20 questions
Weekly Prefix check #2
Quiz
•
4th - 7th Grade
Discover more resources for Arts
6 questions
FOREST Self-Discipline
Lesson
•
1st - 5th Grade
13 questions
Veterans' Day
Quiz
•
1st - 3rd Grade
15 questions
Natural Resources
Quiz
•
KG - 2nd Grade
20 questions
Place Value
Quiz
•
KG - 3rd Grade
16 questions
natural resources
Quiz
•
1st Grade
20 questions
Identify Coins and Coin Value
Quiz
•
1st Grade
24 questions
Addition
Quiz
•
1st Grade
7 questions
Water Conservation
Quiz
•
1st Grade
