
EC8393 - Fundamentals of Data Structures in C
Authored by Jothi P
Computers
University
Used 19+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
25 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
Which loop is most suitable to first perform the operation and then test the
condition?
while loop
for loop
do while loop
All of the mentioned
2.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
What is the output of the below code snippet
#include<stdio.h>
main()
{
printf("%d", -11%2);
}
1
5
-1
-5
3.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
Which of the following function is more appropriate for reading in a multi-word string?
puts()
gets()
printf()
scanf()
4.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
What will be the output of the following C code?
#include <stdio.h>
int main()
{
int a = 1, b = 1, c;
c = a++ + b;
printf("%d, %d", a, b);
}
a = 1, b = 1
a = 1, b = 2
a = 2, b = 2
a = 2, b = 1
5.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
What will be the output of the following C code?
#include <stdio.h>
void main()
{
int x = 5;
if (x < 1)
printf("hello");
if (x == 5)
printf("hi");
else
printf("no");
}
hi
hello
no
error
6.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
Array can be considered as set of elements stored in consecutive memory locations but having __________.
same data type
different data type
same scope
none
7.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
Determine the output:
#include<stdio.h>
int main()
{
int arr[10] = {0,1,2,[7]=7,8,9};
printf("%d ", arr[5]);
printf("%d ", arr[8]);
}
0 0
8 0
0 8
5 8
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?