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.
Answer Posted / 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 View All Answers
A network diagram for a hospital database. Consider your own set of processes for the hospital.
What are the Roles and Responsibilities of BDM in IT Industry ? And Tell me some thing about about IT industries
what is the difference between BI and BW security?
From where I should start to prepare for cat?
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?
How to Cancel SAP PO against Fix transport?
what is capital
what four attribut in business case?
When you are given to develop a computer based information system for banking, how do you write the SDLC diagram?. Explain the five phases with respect to banking.
what is erp manufacturing perspective??
why u choose mba after bca?
Why general ledger accounts require "post automatically" setting in SAP??
Do you personally involved with Major incident process ? If yes, how do you manage it in your present organization ? explain with real scenario !
I'm working with a crosstab in cognos now. Page 1 contains crosstab Page 2 contains list Fact - Revenue Dimension - Product line, Year If I click on the revenue (cell value) it should goto the particular record in another list which is located in a separate page. However, the fact could not be bookmarked. I don't know why. Do you have suggestions? Thanks in advance.
How retrive the deleted file frm UAT by doing migration in SAP BO 4.0