C Language - TypeDef

 



#include <stdio.h>

#include <conio.h>

#include <string.h>


typedef struct student

{

int roll_no;

int marks;

char name[50];

} soor;


soor Ali, Shan, Zarar;


int main()

{

// int *a, b;

int c=33;

typedef int* shan;

shan a, b;

a=&c;

b=&c;

printf ("the address of a is %d\n", a);

printf ("the address of b is %d\n", b+1);


// Ali.roll_no = 1;

// Shan.roll_no = 2;

// Zarar.roll_no = 3;

// Ali.marks = 435;

// Shan.marks = 424;

// Zarar.marks = 419;

//

// printf ( "Roll no. 1 is Ali and he got 1st Position and %s\n", Ali.name);

// printf ("Ali has got %d marks\n", Ali.marks);


return 0;

}


// ScreenShots:





Comments

Popular Posts