C Programming Structures Quiz

C Programming Structures Quiz

University

20 Qs

quiz-placeholder

Similar activities

Sporting and Hound Breed Identification

Sporting and Hound Breed Identification

KG - University

16 Qs

Financial Literacy Proficiency Review #1 3rd ed.

Financial Literacy Proficiency Review #1 3rd ed.

10th Grade - University

17 Qs

quiz #1

quiz #1

University

21 Qs

Structures and Union

Structures and Union

University

15 Qs

Computer Vocabulary

Computer Vocabulary

3rd Grade - University

18 Qs

Data Structures Prelimes

Data Structures Prelimes

University

16 Qs

CODEATHON'22

CODEATHON'22

University

20 Qs

IMPERATIVE VS OOP

IMPERATIVE VS OOP

University

15 Qs

C Programming Structures Quiz

C Programming Structures Quiz

Assessment

Quiz

Other

University

Easy

Created by

SYAM SANKAR

Used 1+ times

FREE Resource

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What keyword is used to define a structure in C?

typedef

define

class

struct

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which of the following is a valid way to create a struct variable?

struct person1: Person;

create struct Person person1;

struct Person = person1;

struct Person person1;

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What operator is used to access members of a structure?

*

&

->

.

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What does the typedef keyword do in C?

Creates an alias for a data type

Allocates memory

Defines a new data type

Declares a variable

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

In the struct definition, what does the following line represent: 'char name[50];'?

An integer variable

A floating-point variable

An array of characters

A pointer to a string

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

How do you assign a value to a string in a struct?

Using = operator

Using sprintf() function

Using strcat() function

Using strcpy() function

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the output of the following code snippet: 'printf("Name: %s\n", person1.name);'?

Name: person1.name

Name: %s

Name: Undefined

Name: George Orwell

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?