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                      
Google
   
 
Categories >> Software >> Programming Languages >> C
 
 


 

 
 C interview questions  C Interview Questions (2248)
 C++ interview questions  C++ Interview Questions (1106)
 VC++ interview questions  VC++ Interview Questions (342)
 Delphi interview questions  Delphi Interview Questions (510)
 Programming Languages AllOther interview questions  Programming Languages AllOther Interview Questions (644)
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 ?    76 Yes 54 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 ?    33 Yes 62 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 ?    8 Yes 41 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 ?    10 Yes 38 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 ?    9 Yes 6 No
Raj
 
  Re: write a c program to store and print name,address,roll.no of a student using structures?
Answer
# 6
http://www.cprogrammingexpert.com/C/Tutorial/fundamentals/datatypes/data_types.aspx 
Is This Answer Correct ?    0 Yes 2 No
Fasfasdfdsaf
 

 
 
 
Other C Interview Questions
 
  Question Asked @ Answers
 
read an array and search an element   1
Differentiate b/w Modify and Update commands giving example.   1
write a program to print the all 4digits numbers & whose squares must me even numbers? Virtusa 2
What will be the output of x++ + ++x? MBT 20
main() { int x=2, y=4 if ((x==2||y==4) x++ y++ if (y==4+1) { x=x+y; } y++; printf("The values of x and y are %d and %d."x,y); } What is the output? TCS 5
main() { int i,j,A; for(A=-1;A<=1;A++) prinf("%d\t",!!A); }   6
7. Identify the correct argument for the function call fflush() in ANSI C: A)stdout B)stdin C)stderr D)All the above Accenture 10
IS STRUCTURES CAN BE USED WITHIN AN ARRAY? Caritor 7
How can I return multiple values from a function?   6
If 4 digits number is input through the keyboard, Write a program to calculate sum of its 1st & 4th digit. Google 11
to get a line of text and count the number of vowels in it   2
program to find a smallest number in an array Microsoft 15
 
For more C Interview Questions Click Here 
 
 
 
 
 


   
Copyright Policy  |  Terms of Service  |  Articles  |  Site Map  |  RSS Site Map  |  Contact Us
   
Copyright 2013  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  KalAajKal.com