IS STRUCTURES CAN BE USED WITHIN AN ARRAY?

Answer Posted / shruti

yesss.

we do used structures within arrays..

struct student
{
char name[20];
int roll_no;
}s[10]

this is array of structures..

we use "."(dot) operator to access the element
s[i].name = ""
s[i].roll_no = ...

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is return in c programming?

505


Explain with the aid of an example why arrays of structures don’t provide an efficient representation when it comes to adding and deleting records internal to the array.

2648


Difference between macros and inline functions? Can a function be forced as inline?

702


What are the different types of data structures in c?

593


What do you mean by keywords in c?

616






What are the applications of c language?

617


What are data structures in c and how to use them?

664


What is the function of multilevel pointer in c?

665


Design a program which assigns values to the array temperature. The program should then display the array with appropriate column and row headings.

1759


What are types of structure?

600


What is the difference between if else and switchstatement

1308


How to get string length of given string in c?

599


Write a program to print all permutations of a given string.

636


What is the explanation for cyclic nature of data types in c?

640


What happens if you free a pointer twice?

598