Determine the output of the C code mentioned below:
#include <stdio.h>
int main()
{
float q = ‘a’;
printf(“%f”, q);
return 0;
}
BS TEST2
Quiz
•
Computers
•
University
•
Hard
Amburu Kumar
Used 1+ times
FREE Resource
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Determine the output of the C code mentioned below:
#include <stdio.h>
int main()
{
float q = ‘a’;
printf(“%f”, q);
return 0;
}
run time error
a
97.000000
d. a.0000000
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of these is NOT a relational or logical operator
=
||
==
!=
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following C code?
#include<stdio.h>
int main()
{
int p = 1, q = 2, r = 3, s = 4, x;
e = r + s = q * p;
printf(“%d, %d\n”, x, s);
}
Syntax error
5, 2
7, 2
7, 4
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
We cannot use the keyword ‘break’ simply within _________
while
for
if-else
do-while
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
The correct format of declaring a function is:
type_of_return name_of_function (argument type);
type_of_return name_of_function (argument type){}
type_of_return (argument type) name_of_function;
all of the above
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Comment on the C statement given below:
int (*p)[5];
A ragged array
An array “p” of pointers
A pointer “p” to an array
None of the above
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
The output of the C code mentioned below would be:
#include <stdio.h>
struct employee
{
int id;
char rank[5];
}
void main()
{
struct employee e;
s.no = 30;
printf(“howdy”);
}
hello
Compile-time error
5, 30
Varies
20 questions
C - Structures
Quiz
•
University
16 questions
C-Extended
Quiz
•
University
20 questions
TECHFEST QUALIFYING ROUND
Quiz
•
University
25 questions
Programming Skills C/C++
Quiz
•
University
15 questions
C Language Quiz-1
Quiz
•
University - Professi...
25 questions
Code Carnival
Quiz
•
University
19 questions
Capsule session 1
Quiz
•
University
15 questions
Python Basics
Quiz
•
KG - University
15 questions
Character Analysis
Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing
Quiz
•
9th - 12th Grade
10 questions
American Flag
Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension
Quiz
•
5th Grade
30 questions
Linear Inequalities
Quiz
•
9th - 12th Grade
20 questions
Types of Credit
Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25
Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers
Quiz
•
6th - 8th Grade