
c star 2
Authored by paaventhan 91
Computers
University
Used 2+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
27) What is the output of the following code?
int fun(char *str1)
{ char *str2 = str1;
while(*++str1);
return (str1-str2);
}
int main()
{ char *str = "GeeksQuiz";
printf("%d", fun(str));
return 0;
}
10
9
8
random number
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
28)What is the output of the following code?
#include<stdio.h>
int main()
{
char str[] = "GeeksQuiz";
printf("%s %s %sn", &str[5], &5[str], str+5);
printf("%c %c %cn", *(str+6), str[6], 6[str]);
return 0;
}
Runtime Error
Compiler Error
uiz uiz uiz u u u
Quiz Quiz Quiz u u u
3.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
29) What is the output of the following code?
void print(int arr[])
{ int n = sizeof(arr)/sizeof(arr[0]);
int i;
for (i = 0; i < n; i++)
printf("%d ", arr[i]);
}
int main()
{ int arr[] = {1, 2, 3, 4, 5, 6, 7, 8};
print(arr);
return 0;
}
a)
b)
c)
d)
1,2,3,4,5,6,7,8
Compile error
1,2
Runtime error
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
30)What is the output of the following code?
int main()
{
float arr[] = {12.4, 2.3, 4.5, 6.7};
printf("%d", sizeof(arr)/sizeof(arr[0]));
return 0;
}
a)5
b)7
c)4
d)8
5
7
4
8
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
31)What is the output of the following code?
int main()
{
int i = 0;
char s[4] = {'\0', '\0', '\0', '\0'};
for(i = 0;i<4;i++)
{
printf("%c", s[i]);
}
return 0;
}
\0\0\0
0\0\0\0
No output
Error
6.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
32) In C, if you pass an array as an argument to a function, what actually gets passed?
Value of elements in array
First element of the array
Base address of the array
Address of the last element of array
7.
FILL IN THE BLANK QUESTION
1 min • 1 pt
34) How many times EEE will be printed
int i=-5;
while(i<=5)
{
If(i>=0)
break;
else
{
i++;
continue;
}
printf(“EEE”)
}
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
Sains Komputer Tingkatan 5 - 1.3.3 Membina Jadual Kebenaran
Quiz
•
1st Grade - Professio...
10 questions
Amazon Aptitude Quiz-SK-1
Quiz
•
University
10 questions
Module 09 - Day 3
Quiz
•
University
12 questions
Python Quiz 1.4
Quiz
•
University
10 questions
Logika Fuzzy
Quiz
•
University
10 questions
ICT 1202-B-2021-Q1
Quiz
•
University
18 questions
Juego sobre pseudocódigo en PseInt
Quiz
•
University
10 questions
Quiz 1
Quiz
•
University
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
10 questions
Probability Practice
Quiz
•
4th Grade
15 questions
Probability on Number LIne
Quiz
•
4th Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
6 questions
Appropriate Chromebook Usage
Lesson
•
7th Grade
10 questions
Greek Bases tele and phon
Quiz
•
6th - 8th Grade
Discover more resources for Computers
12 questions
IREAD Week 4 - Review
Quiz
•
3rd Grade - University
20 questions
Endocrine System
Quiz
•
University
7 questions
Renewable and Nonrenewable Resources
Interactive video
•
4th Grade - University
30 questions
W25: PSYCH 250 - Exam 2 Practice
Quiz
•
University
5 questions
Inherited and Acquired Traits of Animals
Interactive video
•
4th Grade - University
20 questions
Implicit vs. Explicit
Quiz
•
6th Grade - University
7 questions
Comparing Fractions
Interactive video
•
1st Grade - University
38 questions
Unit 8 Review - Absolutism & Revolution
Quiz
•
10th Grade - University