ALLInterview.com :: Home Page            
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
info       Did you received any Funny E-Mails from your Friends and like to share with rest of our friends? Yeah!! you can post that stuff   HERE
Google
   
 
Categories  >>  Software  >>  Programming Languages  >>  C
 
 


 

 
 C interview questions  C Interview Questions
 C++ interview questions  C++ Interview Questions
 VC++ interview questions  VC++ Interview Questions
 Delphi interview questions  Delphi Interview Questions
 Programming Languages AllOther interview questions  Programming Languages AllOther Interview Questions
Question
write a c program to store and print name,address,roll.no of
a student using structures?
 Question Submitted By :: Vatsa
I also faced this Question!!     Rank Answer Posted By  
 
  Re: write a c program to store and print name,address,roll.no of a student using structures?
Answer
# 1
#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 ?    54 Yes 35 No
Balaji Ganesh
 
  Re: write a c program to store and print name,address,roll.no of a student using structures?
Answer
# 2
#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 ?    20 Yes 46 No
Laxmi Bose
 
 
 
  Re: write a c program to store and print name,address,roll.no of a student using structures?
Answer
# 3
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 ?    5 Yes 28 No
Carrie
 
  Re: write a c program to store and print name,address,roll.no of a student using structures?
Answer
# 4
I MA KRUNAL PATEL 
Is This Answer Correct ?    7 Yes 27 No
Krunal Patel
 
  Re: write a c program to store and print name,address,roll.no of a student using structures?
Answer
# 5
#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 ?    1 Yes 0 No
Raj
 

 
 
 
Other C Interview Questions
 
  Question Asked @ Answers
 
what is c  1
write a c program to accept a given integer value and print its value in words  3
what does the following function print? func(int i) { if(i%2)return 0; eale return 1; } main() { int =3; i=func(i); i=func(i); printf("%d",i);} TCS9
what is differnence b/w macro & functions  1
Write a program in c to print 1 121 12321 1234321 123454321 Wipro5
Write a C program that defines a 2-dimentional integer array called A [50][50]. Then the elements of this array should randomly be initialized either to 1 or 0. The program should then print out all the elements in the diagonal (i.e. a[0][0], a[1][1],a[2][2], a[3][3], ……..a[49][49]). Finally, print out how many zeros and ones in the diagonal. Infosys2
main() { char *p; p="Hello"; printf("%c\n",*&*p); } ME2
Write a C++ program without using any loop (if, for, while etc) to print prime numbers from 1 to 100 and 100 to 1 (Do not use 200 print statements!!!) HCL2
Write a program that takes three variables(a,b,c) in as separate parameters and rotates the values stored so that value a goes to b,b,to c and c to a  6
Read N characters in to an array . Use functions to do all problems and pass the address of array to function. 1. Print only the alphabets . If in upper case print in lower case vice versa.  1
What are the various topologies? Which one is the most secure?  2
array of pointer pointer to array pointer to pointer MAHINDRA1
 
For more C Interview Questions Click Here 
 
 
 
 
 


   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2012  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com