Question: (Write a program, and show the output too ) C programming I have a hard time to get these five questions done. I am thankful
(Write a program, and show the output too) C programming
I have a hard time to get these five questions done. I am thankful if someone can help me with that.
I started with something but i couldn't get it done.
That's what I've done.
#include
Profile prof[3] = {"myName", 19}, {"bob", 12} arr[1] = prof;
for (int i = 0; i < 3; i++) { printf('%s', arr[i].name); }
Consider this
struct _profile {
char name [32] ;
int age;
}
That's the assignment.
Use the above structure
put all the below questions in one main file, compile and run, show the output.
11. Define a array of structures with three cells using the above structure. Name the array Profile ;
12. Assign the cell at index 0 : name = "Cindy", age = 28;
Assign the cell at index 1 : name = "Sean", age = 38;
Assign the cell at index 2 : name = "John", age = 23;
13. print the values of all structures using a for loop.
14. Define a array of structures with three cells using the above structure. Name the array ProfileBackup [ 3 ] ;
Copy all three cells from Profile array to ProfileBackup using a for loop.
15. Search and print the index of the cell where you could find "John".
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
