APJ ABDUL KALAM TECHNOLOGICAL UNIVERSITY Previous Years Question Paper & Answer

Course : B.Tech

Semester : S1 and S2

Year : 2017

Term : DECEMBER

Branch : BIOTECHNOLOGY

Scheme : 2015 Full Time

Course Code : CS 100

Page:33





PDF Text (Beta):

int
a[5],b,
९;
clrscr()
printf("enter 5 nos");
for(b=0; b<5; b++)
{
scanf("%d" ,&a[b]);
}
sorting(a, 5);
getch();
}

void sorting(int *x, int y)
{
int i,j,temp;
for(i=1; i<=y-1; i++)
{
for(j=0; j*(x+j+1))
{
temp="*(x+j);
*(x+j)=* (>+
+1);
*(x+j+1)=tem
0;
}
}
}
for(i=0; i<5; i++)
{

Printf(“\n Sorted elements are:”);
printf("\t%d",*(x+i));

}

}
output enter 5 nos;
256711
Sorted elements are: 11765 2

b)Write a C program to compute basic arithmetic functions using functions.

#include
void main()
{

int a,b,c,d,e,f;

17500); printf(""Enter
Two Values :");
scanf("%d%d" ,&a,&b);
sum(a,b); — mult(a,b);
(௨0); getchQ);

} शाति 3101

y)
{ int 2; Z=X+Y; printf("Addtion : %d\n",z);
return ೦;
}
mult(int x,int y)

{

Similar Question Papers