Structure In C Program


#include<stdio.h>
#include<conio.h>
struct add
{
	int a,b,c;
}o[100];
void main()
{
	int i;
	clrscr();
	for(i=0;i<2;i++)
	{
	      printf("\nEnter 2 Nos : ");
	      scanf("%d%d",&o[i].a,&o[i].b);
	      o[i].c=o[i].a+o[i].b;
	      printf("\nTotal : %d",o[i].c);
	      getch();
	}
}

Login To Download Source Code

Leave a Comment:

Login To Comment

List Of Programs


Goto Examples

Operators

Looping

Number Conversion

Pattern Design

Arrays

Matrix Examples

Sorting Examples

String Function

Change Case

String In C

Maths Functions

User Defined Functions

Recursive Functions

Pointer

Structure

File Concept

Calender Programming