Programming in C - Structure

Programming in C - Structure

University

20 Qs

quiz-placeholder

Similar activities

After Effect Intoduction

After Effect Intoduction

10th Grade - University

15 Qs

Memory-Mobo-Hard/Software

Memory-Mobo-Hard/Software

University

18 Qs

PARC Linux Basic Part 2

PARC Linux Basic Part 2

University

20 Qs

SQL Quiz

SQL Quiz

University

18 Qs

BIM1014 Quiz 2

BIM1014 Quiz 2

KG - University

15 Qs

CORLANG Week6-7

CORLANG Week6-7

10th Grade - University

20 Qs

LAN, MAN, WAN Network

LAN, MAN, WAN Network

12th Grade - University

18 Qs

Chapter 8. Securing Network Media and Devices

Chapter 8. Securing Network Media and Devices

University

20 Qs

Programming in C - Structure

Programming in C - Structure

Assessment

Quiz

Computers

University

Practice Problem

Hard

Created by

mahaveerakannan r

Used 41+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

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

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?

Discover more resources for Computers