Answer to Question #19961 in C++ for faris abdelhafiz

Question #19961
Write a complete C program for the following :-
1. Write a structure with the following fields :-

· Name < array of characters>
· Id number < integer>
· Marks <integer>
· Status < array of characters >
1
Expert's answer
2012-12-04T08:57:02-0500
#include <stdio.h>
#include <string.h>

struct Structure
{
char name[32];
int id;
int mark;
char status[16];
};

main()
{
struct Structure s;
s.id = 1;
s.mark = 4;
strcpy(s.name, "Paul");
strcpy(s.status, "Unknown");
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS