You are on page 1of 1

1)WAP SWAP TWO NUMBER USING POINTER.

2)WAP TO ADD TWO COMPLEX NUMBER USING STRUCTURE.

3)DEFINE A STRUCTURE EMPLOYEE HAVING DATA MEMBER NAME,AGE, DEFINE ANOTHER


STRUCTURE SALARY HAVING DATA MEMBER BASIC SALARY,H.R.A AND DISPLAY THE DETAILS
INFORMATIO OF EMPLOYEE LIKE NAME,AGE & GROSS SALARY BY ASTRUCTURE VARIABLE SALARY.

4)Define a structure Student having data members rollno,name & age, store information of 5
student using dynamic memory allocation.

5)Add two numbers using command lin argument.

LAB-2

1) Write a C program to extract each byte from a given number and store them in separate character
variables and print the content of those variables.

2) Write a C Program to enter a number and store the number across the following structure and
print the content of each member of the structure. Then aggregate each member of the structure to
form the original number and print the same.

struct pkt

char ch1;

char ch2[2];

char ch3;

};

3) Write a C program to check whether the Host machine is in Little Endian or Big Endian.

You might also like