Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Summary

Summary Structures-2

Rating
-
Sold
-
Pages
1
Uploaded on
13-03-2023
Written in
2022/2023

This provides some more additional information about sturctures in c programming

Institution
Course

Content preview

C programming is a platform for learning the C programming language. In the
previous video, we discussed structures. We covered an introduction to structures
including what a structure is, how to declare a structure, and why we need
structures.A structure is a user-defined data type that allows variables of that
data type to be created. These variables are called objects. In the next video, we
will discuss how to access the members of an object using a proper program example.
When declaring variables of a structure data type, you will use the object name to
access members of the structure. The variable declaration will look like
this:<data_type> <object_name>; // Example: struct student s;This is how you would
declare variables of the structure. The tag of the structure is optional, so you
can remove it. Here is an example:struct student { char name[50]; int id; float
cgpa;};// Declaring variables of the structurestruct student s1;struct student
s2;One drawback of this approach is that at some point in our program, we may need
to declare more variables of the same structure data type.


In the video, you will learn how to access the members of the structure and store
values for a specific student, such as roll number one. To initialize the variables
s1 and s2 of the struct student data type, use printf and scanner.

Written for

Institution
Course

Document information

Uploaded on
March 13, 2023
Number of pages
1
Written in
2022/2023
Type
SUMMARY

Subjects

$10.99
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
adithyanlachu

Get to know the seller

Seller avatar
adithyanlachu kongu engineering college
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
3 year
Number of followers
0
Documents
4
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions