sorcerer_see: (Default)
#include <stdio.h>
#include <string.h>

typedef struct
{
int id;
char title[40];
float hours;
course;
}

int main ()
{
course cs1;
course cs2;
cs1.id = 123456;
strcpy (cs1.title, "JavaScript Basics");
cs1.hours = 12.30;
 
/* initialize cs2 */
cs2.id = 341281;
strcpy (cs2.title, "Advanced C++");
cs2.hours = 14.25;

/* display course info */ 
printf ("%d\t%s\t%4.2f\n", cs1.id, cs1.title, cs1.hours);
printf ("%d\t%s\t%4.2f\n", cs2.id, cs2.title, cs2.hours);
return 0;
}

Profile

sorcerer_see: (Default)
sorcerer_see

October 2025

S M T W T F S
    12 34
56 7 8 9 10 11
12 1314 15 16 1718
19 2021 22 23 2425
2627 28293031 

Style Credit

Expand Cut Tags

No cut tags
Page generated Jan. 16th, 2026 02:29 am
Powered by Dreamwidth Studios