
Programming in C - Structure
Quiz
•
Computers
•
University
•
Practice Problem
•
Hard

mahaveerakannan r
Used 41+ times
FREE Resource
Enhance your content in a minute
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Which of the following are themselves a collection of different data types?
string
structures
char
all of the mentioned
2.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
User-defined data type can be derived by___________
struct
enum
typedef
all of the mentioned
3.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
What will be the output of the following C code?
#include <stdio.h>
struct student
{
int no;
char name[20];
}
void main()
{
struct student s;
s.no = 8;
printf("hello");
}
Compile time error
Nothing
hello
Varies
4.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Which of the following return-type cannot be used for a function in C?
char *
struct
void
none of the mentioned
5.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Which of the following is not possible under any scenario?
s1 = &s2;
s1 = s2;
(*s1).number = 10;
None of the mentioned
6.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Which of the following operation is illegal in structures?
Typecasting of structure
Pointer to a variable of the same structure
Dynamic allocation of memory for structure
All of the mentioned
7.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Comment on the output of the following C code.
#include <stdio.h>
struct temp
{
int a;
int b;
int c;
};
main()
{
struct temp p[] = {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}};
}
No Compile time error, generates an array of structure of size 3
No Compile time error, generates an array of structure of size 9
Compile time error, illegal declaration of a multidimensional array
Compile time error, illegal assignment to members of structure
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
ADB Quiz #1
Quiz
•
University
20 questions
Quiz Harian Gdevelop MPK
Quiz
•
University
15 questions
Computer and Other Human Inventions
Quiz
•
University
16 questions
Pengantar Teknologi Informasi 7
Quiz
•
University
15 questions
Robotics Prelim
Quiz
•
University
20 questions
Digital and Analog transmission
Quiz
•
University
15 questions
GIS Unit III
Quiz
•
University
15 questions
Internet Basics
Quiz
•
5th Grade - 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
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
20 questions
Figurative Language Review
Quiz
•
6th Grade
