Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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.

Answers were Sorted based on User's Feedback



Write a C Program to create a structured data file named Student.dat to store the roll no, name a..

Answer / asiya

i want to this quastion answer

Is This Answer Correct ?    124 Yes 31 No

Write a C Program to create a structured data file named Student.dat to store the roll no, name a..

Answer / muklesh kumr

#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 ?    73 Yes 64 No

Write a C Program to create a structured data file named Student.dat to store the roll no, name a..

Answer / madhuri

How tO store different students details using file. In c language. Can anybody help me?

Is This Answer Correct ?    3 Yes 1 No

Write a C Program to create a structured data file named Student.dat to store the roll no, name a..

Answer / ratnesh kumar

Write a C program that asks the user to enter a 10-digit.telephone number (the first three digits refer to the area code, the next three digits refer to the exchange code, and the remaining four digits refer to number), print the parts of the number and complete telephone number in additionto the area code and exchange code.


#include<stdio.h>
#include<conio.h>
main()

      
     long int num,area_code,exchange_code,remaining_number,d,s;
     printf("Enter the Number
");
     scanf("%ld",&num);
     area_code=num/10000000;
     printf("The area code is%ld",area_code);
     d=num/10000;
     exchange_code=d%1000;
     printf("
The exchange code is%ld",exchange_code);
      remaining_number=num%10000;
      printf("
remaining_number is%ld",remaining_number);
      printf("
the sum of areacode and exchange code is:%ld",exchange_code+area_code);
      
    getch();
}

Is This Answer Correct ?    4 Yes 4 No

Post New Answer

More IT Management Interview Questions

state the role of cost accounting in large scale industry

0 Answers  


TDS calculation

5 Answers   Brakes India, Kotak, V-Trans,


What type of questions will be asked in Bank of India Computer Officers (IT) exam? Will someone provide me the sample paper of Bank of India Computer Officer (IT) exam?

0 Answers   Bank Of India,


Why general ledger accounts require "post automatically" setting in SAP??

0 Answers  


What are your strengths and talents?

0 Answers  


What unique experience or qualifications separate you from other candidates?

0 Answers  


The process of discovering relationships using data analytics tools, such as statistical software, statistical graphing, and mapping software is referred to as pattern mapping.

0 Answers  


In SAP SD , HOw to remove the materail block ?

1 Answers  


where do you see yourself after 5 or 10 years

4 Answers   Hotel Jobs, Vodafone,


What are the practices you follow for closing a project and meeting the conditions required to establish closure?

0 Answers   Safeway,


i am going for the IT Officer written test,can any body mail me the question bank to Pragyanmund@rediffmail.com

0 Answers  


DataStage 7.5 & DataStage 8.5 :Which Oracle Database version is supported as target datasource?

0 Answers  


Categories
  • Business Administration Interview Questions Business Administration (517)
  • Marketing Sales Interview Questions Marketing Sales (1279)
  • Banking Finance Interview Questions Banking Finance (3209)
  • Human Resources Interview Questions Human Resources (747)
  • Personnel Management Interview Questions Personnel Management (68)
  • Hotel Management Interview Questions Hotel Management (29)
  • Industrial Management Interview Questions Industrial Management (113)
  • Infrastructure Management Interview Questions Infrastructure Management (14)
  • IT Management Interview Questions IT Management (97)
  • Supply Chain Management Interview Questions Supply Chain Management (16)
  • Operations Management Interview Questions Operations Management (39)
  • Funding Interview Questions Funding (79)
  • Insurance Interview Questions Insurance (494)
  • Waste Management Interview Questions Waste Management (1)
  • Labor Management Interview Questions Labor Management (48)
  • Non Technical Interview Questions Non Technical (73)
  • Business Management AllOther Interview Questions Business Management AllOther (546)