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 (879)
 Finance interview questions  Finance Interview Questions (1048)
 Human Resources interview questions  Human Resources Interview Questions (701)
 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 ?    114 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 ?    65 Yes 60 No
Muklesh Kumr
 
 
 

 
 
 
Other IT Management Interview Questions
 
  Question Asked @ Answers
 
What is the difference between product based and service based IT companies? ABC 2
What tools do you use to monitor and control projects? Safeway 5
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. Symbiosis 2
what is farm accounting?   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
YOU ARE COMING FROM CITY "A" AND WANT TO REACH "B". 3 ROADS MEET AT JUNCTION 'X',TO/FROM A,B,AND C. AT X,2 PERSON ARE STANDING-1ALWAYS SAY TRUTH ,ANOTHER ALWAYS SAY LIE. IN ONLY ONE QUESTION,HOW WILL YOU ASK THE WAY TO 'B'(YOU ARE COMING FROM 'A')   4
what is your self n what is your hobise n why?   1
Pls tell me how to answer dis question... Red is My FAV color? White is MY FAV Color? & Black is my FAV color Genpact 2
What is security policy? To protect an organizationís information what security policy need to follow according to you.   1
what is the difference between BI and pervasive BI? NIIT 1
Write a C Program to declare an array for 2 0 floats. Accept the values from the user sort the two arrays in descending order. Merge the two arrays into a new array and display the new array. Symbiosis 1
what is the difference between oracle ERP products and SAP ERP products?   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