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:27





PDF Text (Beta):

{ printf(" element - %d
೫,3) ர்‌
5೦೩೧೫ ("$d",arrl1+ti);
}
printf(" The elements you entered are : \n");
for (i=0;i{
printf(" element - 50 : %d \n",i,*(arrl1+i));
}

return 0;

Sample Output:

Pointer : Store and retrieve elements from an array
Input the number of elements to store in the array :5
Input 5 number of elements in the array

element - 0 5

element - 1 7

element - 2 : 2

element - 3 9

element - 4: 8

The elements you entered are

element - 0: 5

c) Write a C program to store and display the following details of n students using structure. Name,
Rollno,Marks

#include
struct student

{ char

name [50]; int
roll; float
marks;

} s[10];

int main()

{

int i;
printf ("Enter information of students:\n");

// storing information
701 (350; i<10; ++i)
{

s[i].roll = 1+7

printf ("\nFor roll numberSd,\n",s[i].roll);

printf ("Enter name:
७४) ५
scanf("%s",s[i].name) ;

printf ("Enter marks:
1);

scanf("%f",&s[i].marks) ;

22൩൧൦ (*7೧') ;
}
printf ("Displaying Information:\n\n") 7
// displaying information
701 (350; i<10; ++i)
1

Similar Question Papers