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 >> Business Management >> IT Management
 
 


 

 
 Business Administration interview questions  Business Administration Interview Questions (413)
 Marketing Sales interview questions  Marketing Sales Interview Questions (878)
 Finance interview questions  Finance Interview Questions (1046)
 Human Resources interview questions  Human Resources Interview Questions (699)
 Personnel Management interview questions  Personnel Management Interview Questions (11)
 Hotel Management interview questions  Hotel Management Interview Questions (18)
 Industrial Management interview questions  Industrial Management Interview Questions (58)
 Infrastructure Management interview questions  Infrastructure Management Interview Questions (12)
 IT Management interview questions  IT Management Interview Questions (87)
 Non Technical interview questions  Non Technical Interview Questions (68)
 Business Management AllOther interview questions  Business Management AllOther Interview Questions (364)
Question
Write a C Program to create a structured data file named 
Student.dat to store the roll no, name
and course.
Provide following functions:
1. Accept the values from the user using structure 
variables. Store the contents in a file.
2. Display the file.
3. The user should be able to add new records to the 
existing file. And display the new file.
 Question Submitted By :: IT-Management
I also faced this Question!!     Answer Posted By  
 
Answer
# 1
i want to this quastion answer 
Is This Answer Correct ?    113 Yes 28 No
Asiya
 
Answer
# 2
#include <stdio.h>
#include <ctype.h>

struct Student
{
int ID;
char LastName[32];
char FirstName[32];
int DateOfBirth; // This could be of the form YYYYMMDD. For example someone born on December 21st, 1990 would have a value of 19901221
char Address[32];
char TelephoneNumber[11]; // a 10-digit string
char ProgramPursued[32];
};


char GetUserOption()
{
char option = 'I'; // 'I' for Invalid

while(option == 'I')
{
// Print the menu items
printf("\n");
printf("Choose one of the following options:\n[u]pdate [P]rint [S]earch [E]xit\n");
scanf("%c", &option);

switch(toupper(option))
{
case 'U':
case 'P':
case 'S':
case 'E':
break;
default:
option = 'I';
break;
}
}

return option;
}


// students must hold 10 students
void LoadStudents(Student students[])
{
// TODO: load students from file
}


// students must hold 10 students
void SaveStudents(Student students[])
{
// TODO: save students to file
}


int main()
{
Student students[10];
int looping = 1;

// Load the students from the file
LoadStudents(students);

// Loop until exit
while(looping)
{
char option = GetUserOption();
switch(option)
{
case 'U':
// TODO: Let the user update a record
break;

case 'P':
// TODO: Print the students to the screen
break;

case 'S':
// TODO: Let the user search for a student
break;

case 'E':
looping = 0; // exit the loop
break;
}
}

// Save the students to the file
SaveStudents(students);

return 0;
 
Is This Answer Correct ?    64 Yes 58 No
Muklesh Kumr
 
 
 

 
 
 
Other IT Management Interview Questions
 
  Question Asked @ Answers
 
in my office to access data fast i replaced 8 port hub with 8 port dlink switch my network connectivity is gone all the led keep blinking do you i have to change cabeling or change the switch   1
hi frnds, i hv a querry regarding my future. i m an engineer (electronics n communication),hving two year exp in telecom sectoe as a RF optimization engg. now doing MBA in MARKETING. can nyone suggest me which sector of management and what profile will be the best accoeding my past profile where i can hv a advantage of my technical background... plz help me frnds...   2
What is Difference between Comprehensive AMC and Non- Comprehensive emc2 2
what is farm accounting?   1
What motivates you? How do you motivate others?   3
How do you manage suppliers? Safeway 1
What are Tier 1 and Tier 2 IT companies??   2
why u choose mba after bca? Samsung 2
What tools do you use to monitor and control projects? Safeway 5
what is difference between a primary market and secondary market in us economy as per e-commerce point of view ?   1
What is BID ADMINISTRATION?   1
what is your self n what is your hobise n why?   1
 
For more IT Management 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