Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
PER problem 2
#include <stdio.h> #include <string.h> typedef struct{ char streetnum[30]; char City[20]; int zipcode; }address; typedef struct{ int id; char name[20]; char grade; address point; }student; //void func(struct student stud); int func(student astud){ printf(" Id is: %d \n", astud.id); printf(" Name is: %s \n", astud.name); printf(" Grade is: %c \n", astud.grade); printf(" Address is: %s \n", astud.point.streetnum); printf(" %s \n", astud.point.City); printf(" %d \n", astud.point.zipcode); return 0; } int main() { student astud; astud.id=9401; strcpy(astud.name, "Joe"); astud.grade = 'A'; strcpy(astud.point.streetnum,"2401RealStreet"); strcpy(astud.point.City,"Washington,DC"); astud.point.zipcode=555555; func(astud); return 0; }
run
|
edit
|
history
|
help
0
Présentation
Lab 8 part 2 v.05
switch_nota
Assignment 3
static int account
Test2
ordenarcifrademenosamas
co_assign1_ques_4
18BCE2182 ASSESS_1 Q1-6
A_141124Burbuja