What is a structure in c language. how to initialise a structure in c?



What is a structure in c language. how to initialise a structure in c?..

Answer / Rohit Kumar Sharma

In C, a structure is a user-defined data type that allows you to combine different types of data into a single entity. Structures are useful for organizing complex data structures such as records.nnTo initialize a structure in C, you can use the following syntax:nn```cnstruct Student {n int id;n char name[50];n float gpa;n};nnstruct Student student = {n 1,n "John Doe",n 3.5n};```

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Interview Questions

Is c object oriented?

1 Answers  


1,4,8,13,21,30,36,45,54,63,73,?,?.

10 Answers   AMB, Franklin Templeton,


Hai,I have done with my bachelor of commerce and planing to ms,please suggest me how to convince vo for shifting from commerce to computers. Visa on 8 DEC 2014  Npu university

1 Answers  


What is || operator and how does it function in a program?

1 Answers  


What is identifiers in c with examples?

1 Answers  


Why is this loop always executing once?

1 Answers  


How to avoid buffer overflow?

1 Answers  


Give the logic for this #include<stdio.h> #include<conio.h> void main() { clrscr(); int a=10,b; b=++a + ++a; printf("%d", b); getch(); } Output: 24......How?

2 Answers   Accenture,


writw a program to insert an element in the begning of a doubly linked list

1 Answers  


Explain is it valid to address one element beyond the end of an array?

1 Answers  


What are formal parameters?

1 Answers  


How #define works?

1 Answers  


Categories