
C_PROG
Quiz
•
English
•
University
•
Practice Problem
•
Medium
Harshitha P
Used 1+ times
FREE Resource
Enhance your content in a minute
8 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
#include <stdio.h>
int main()
{
int* pc, c;
c = 5;
pc = &c;
c = 1;
printf("%d", c);
printf("%d", *pc);
return 0;
}
11
1
5
15
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
#include <stdio.h>
int main()
{
int myAge = 43;
int* ptr = &myAge;
printf("%p\n", ptr);
printf("%d\n", *ptr);
return 0;
}
43
0x7ffe102fd7a4
0x7ffe102fd7a4
43
0x7ffe102fd7a4
43
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
#include <stdio.h>
int main()
{
int myNumbers[4] = {25, 50, 75, 100};
printf("%d", sizeof(myNumbers));
return 0;
}
4
8
16
12
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
#include <stdio.h>
int sum(int k);
int main() {
int n=10;
int result = sum(n);
printf("%d", result);
return 0;
}
int sum(int n) {
if (n > 0) {
return n + sum(n- 1);
} else {
return 0;
}
}
10
55
50
30
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
#include <stdio.h>
int main() {
int matrix[2][3] = { {1, 4, 2}, {3, 6, 8} };
printf("%d", matrix[0][2]);
return 0;
}
4
6
3
2
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
#include <stdio.h> #include <string.h> int main() { char a[20]="Program"; char b[20]={'P','r','o','g','r','a','m','\0'}; // using the %zu format specifier to print size_t printf("Length of string a = %zu \n",strlen(a)); printf("Length of string b = %zu \n",strlen(b)); return 0; }
7 ,7
7,8
8,7
8,8
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
#include <stdio.h>
#include <string.h>
int main() {
char first_str[] = "NMIT";
char second_str[] = "NMI"
int res = strcmp(first_str, second_str);
if (res==0)
printf("Strings are equal");
else
printf("Strings are unequal");
return 0;
}
Strings are equal
ERROR
Strings are unequal
1
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
8 questions
RICA Practice-Subtest 3
Quiz
•
University
12 questions
Pathways 3 Unit 6 - Reading 2 comprehension
Quiz
•
University
6 questions
Problem-solution essay
Quiz
•
University
10 questions
45 CHECK PRONOUN REFERENCE FOR AGREEMENT
Quiz
•
University
12 questions
Phrasal Verbs
Quiz
•
University
10 questions
LEVEL B1 / LISTENING / VIDEO .- JAPANESE CULTURE
Quiz
•
University
10 questions
Rhetorical Techniques
Quiz
•
9th Grade - University
12 questions
Interview Revision Quiz
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
54 questions
Analyzing Line Graphs & Tables
Quiz
•
4th 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
Discover more resources for English
12 questions
IREAD Week 4 - Review
Quiz
•
3rd Grade - University
23 questions
Subject Verb Agreement
Quiz
•
9th Grade - University
21 questions
Past Perfect Tense
Quiz
•
University
21 questions
Contractions
Quiz
•
KG - University
8 questions
Because of Winn-Dixie Chapters 4-6
Quiz
•
KG - University
14 questions
Charlie and the Chocolate Factory Chapters 11-20
Quiz
•
2nd Grade - University
