write a c program to store and print name,address,roll.no of
a student using structures?

Answers were Sorted based on User's Feedback



write a c program to store and print name,address,roll.no of a student using structures?..

Answer / balaji ganesh

#include<string.h>
#include<conio.h>
#include<stdio.h>
struct student
{
char name[20],adr[5][10];
int no;
}s;
main()
{
int i,j;
clrscr();
scanf("%d",&s.no,printf("enter no of the student:"));
scanf("%s",s.name,printf("enter name of student:"));
printf("enter address(5 lines):\n");
for(i=0;i<=5;i++)
{
j=0;
while((s.adr[i][j++]=getchar())!='\n');
}
printf("\nstudent details are:\n\nRoll.no: %d\n\nName : %s\n\nadress:",s.no,s.name);
for(i=0;i<=5;i++)
printf("\t%s",s.adr[i]);
getch();
}

Is This Answer Correct ?    139 Yes 97 No

write a c program to store and print name,address,roll.no of a student using structures?..

Answer / raj

#include<string.h>
#include<conio.h>
#include<stdio.h>
struct student
{
char name[20],adr[5][10];
int no;
}s;
main()
{
int i,j;
clrscr();
scanf("%d",&s.no,printf("enter no of the student:"));
scanf("%s",s.name,printf("enter name of student:"));
printf("enter address(5 lines):\n");
for(i=0;i<=5;i++)
{
j=0;
while((s.adr[i][j++]=getchar())!='\n');
}
printf("\nstudent details are:\n\nRoll.no: %d\n\nName :
%s\n\nadress:",s.no,s.name);
for(i=0;i<=5;i++)
printf("\t%s",s.adr[i]);
getch();
}

Is This Answer Correct ?    33 Yes 28 No

write a c program to store and print name,address,roll.no of a student using structures?..

Answer / fasfasdfdsaf

http://www.cprogrammingexpert.com/C/Tutorial/fundamentals/datatypes/data_types.aspx

Is This Answer Correct ?    8 Yes 18 No

write a c program to store and print name,address,roll.no of a student using structures?..

Answer / nidhina

enter the number of students 2
enter the name anu
enter the address ui
fh
fn
hg
hgn


rollno 2
name anu
address
ui fh
fn
hg
hgn

Is This Answer Correct ?    2 Yes 15 No

write a c program to store and print name,address,roll.no of a student using structures?..

Answer / laxmi bose

#include<stdio.h>
#include<string.h>
#include<conio.h>
struct laxmi
{
int rollname;
char name;
char address;
}struct laxmi l;
void main()
{
scanf("%d%c%c",&rollname,name,address);
printf("%d%c%c",roolname,name,address);
}

Is This Answer Correct ?    54 Yes 88 No

write a c program to store and print name,address,roll.no of a student using structures?..

Answer / krunal patel

I MA KRUNAL PATEL

Is This Answer Correct ?    15 Yes 54 No

write a c program to store and print name,address,roll.no of a student using structures?..

Answer / carrie

write a program to accept a salesman name and monthly sales
amount and calculate the commision as per the given criteria
SALES COMMISION
<=10000 0
>10000 and <=25000 10% of sales amount
>25000 and <=100000 20% of sales amount
>100000 25% of sales amount

Is This Answer Correct ?    12 Yes 59 No

Post New Answer

More C Interview Questions

enum DAY { sunday, monday, tuesday }; enum EDAYS { friday, saturday, sunday }; void main() { int i =0; if( i == sunday) { printf("%d",i); } } what would be the output?

4 Answers   TCS,


What is realloc in c?

0 Answers  


Develop a program that computes the new price of an item. The program should receive a character variable colour and a double precision floating-point variable price from the user. Discount rate is determined based on the colour of the discount sticker, as shown in the following table. An error message should be printed if an invalid colour has been entered

1 Answers  


main() { int a,b; printf("%d,%d",scanf("%d%d",&a,&b)); } => do u mean above program's output... =>output will be:2,whatever you enter value for b. =>because scanf is a library fn which will return how many arguements it processes, and second value you are right mr.Satya but i found my self unable to understand that for the first time scanf returns the no of successful matches but how for the second time it returns the value of 'b'.while a function should return the same 'r' value every time.

1 Answers   Cisco,


How to print "I Love My India" without using semi colon?

4 Answers  


write a c programming using command line argument,demonstrate set operation(eg;union,intersection,difference) example output is c:>setop 12 34 45 1 union 34 42 66 c:>setop 12 34 1 42 66 c:>setop 12 34 diff 12 56 67 78 setop 12 34

0 Answers  


What are the different data types in C?

0 Answers  


Explain argument and its types.

0 Answers  


What is the difference between union and anonymous union?

0 Answers   Hexaware,


Explain what is the difference between text files and binary files?

0 Answers  


What is 02d in c?

0 Answers  


what are the advanced features of functions a) function declaration and prototypes b) calling functions by value or by reference c) recursion d) all the above

0 Answers  


Categories