C Programming Day-12

C Programming Day-12

University

10 Qs

quiz-placeholder

Similar activities

Linh kiện thụ động

Linh kiện thụ động

University

15 Qs

Acero

Acero

University

10 Qs

Preguntas sobre Controladores Industriales

Preguntas sobre Controladores Industriales

University

10 Qs

UNIT , DIMENSION & STANDARD

UNIT , DIMENSION & STANDARD

University

15 Qs

Quiz 5. Captación de agua superficial 2025-II

Quiz 5. Captación de agua superficial 2025-II

University

11 Qs

IC QUIZ

IC QUIZ

University

10 Qs

Metodología de la Programación P1P2

Metodología de la Programación P1P2

University

10 Qs

Quiz on Divide and Conquer Approach

Quiz on Divide and Conquer Approach

University

10 Qs

C Programming Day-12

C Programming Day-12

Assessment

Quiz

Engineering

University

Medium

Created by

Vaishnavi K AIDS

Used 1+ times

FREE Resource

AI

Enhance your content in a minute

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

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

How do you define a structure with a name student containing an int age?

struct student { int age; };

structure student { int age; };

struct student = { int age; };

student struct { int age; };

Answer explanation

This defines a structure named student with one member age of type int.
It groups related data (here, just age) under one name using the struct keyword.

2.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

Media Image

Predict the output

3 4

4 3

Compilation Error

0 0

Answer explanation

The structure is correctly initialized with x = 3 and y = 4.

3.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

Which keyword is used to define a structure in C?

class

struct

object

define

Answer explanation

In C, struct is the keyword used to create a user-defined data type that groups variables of different types.

4.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

What is the symbol used to declare a pointer?

&

%

*

@

Answer explanation

The asterisk ( * )i s used to declare and dereference a pointer.

5.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

What does the & operator do in C?

Adds two numbers

Finds modulus

Multiplies pointers

Finds address of a variable

Answer explanation

&x gives the memory address of x.

6.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

Media Image

What is the output of the following code?

Address of x

10

Garbage

Compilation error

Answer explanation

For example, &x gives the memory address of x.

7.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

How do you access the member age of a structure variable p?

p->age

p.age

age.p

p->age()

Create a free account and access millions of resources

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

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?