Computer Science, asked by nooonameee, 1 year ago

??what is the syntax for structure??​


saiprasad8389brainly: hiii bro....pls. mark it as brainlist answer
nooonameee: Bor
nooonameee: Bro Ur answer damaging my brain cells
gurukulamdivya: check the second answer
nooonameee: it's Copied
gurukulamdivya: not at all.. u r mistaken dear
nooonameee: BTw .. both of you thank you so much!!
gurukulamdivya: u are most welcome dear

Answers

Answered by gurukulamdivya
1

Answer:

Syntax is the grammatical structure of sentences. The format in which words and phrases are arranged to create sentences in programming language is called syntax.

Answered by siddhartharao77
9

Sample notes on structures:

(i) It is a user defined datatype.

(ii) It is a collection of different types of data elements in a single entity.

(iii) When we are working with structures, at the end of the structures semicolon is required.

(iv) Members declared inside structure are called as "Member of structure".

(v) To define a structure, we use Struct keyword.

Syntax:

struct structure-name

{

Datatype1 mem1;

Datatype mem2;

};

Example:

struct Emp

{

int emp_no;

char name[20];

float salary;

};

Explanation:

The name of structure is called as Employee.

Here, struct Emp declares the structure to hold the details of the employee which consists of 3 data fields, namely emp_no, name and salary. These fields are called as Structure members (or) elements.

Hope this information helps!


Swetha02: Superb, annaya!
siddhartharao77: thank you Chelli
Swetha02: ☺️☺️☺️
Similar questions