
Programming in C - Structure

Quiz
•
Computers
•
University
•
Hard

mahaveerakannan r
Used 40+ times
FREE Resource
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
Create a free account and access millions of resources
Similar Resources on Wayground
25 questions
02/05/2025

Quiz
•
University
20 questions
Programming in C(1)

Quiz
•
University
20 questions
Linux 3-4

Quiz
•
University
25 questions
Aptitude Competition(SY)

Quiz
•
University
16 questions
C/C++ Programming Chapter 2

Quiz
•
University
19 questions
ADS 1 March 2025

Quiz
•
University
20 questions
ROUND 1 QUIZ FOR 1ST YEAR

Quiz
•
University
15 questions
Mikropemproses dan Mikropengawal

Quiz
•
12th Grade - University
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

Interactive video
•
10th - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Computers
21 questions
Spanish-Speaking Countries

Quiz
•
6th Grade - University
20 questions
Levels of Measurements

Quiz
•
11th Grade - University
7 questions
Common and Proper Nouns

Interactive video
•
4th Grade - University
12 questions
Los numeros en español.

Lesson
•
6th Grade - University
7 questions
PC: Unit 1 Quiz Review

Quiz
•
11th Grade - University
7 questions
Supporting the Main Idea –Informational

Interactive video
•
4th Grade - University
12 questions
Hurricane or Tornado

Quiz
•
3rd Grade - University
7 questions
Enzymes (Updated)

Interactive video
•
11th Grade - University