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.

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


Please Help Members By Posting Answers For Below Questions

A network diagram for a hospital database. Consider your own set of processes for the hospital.

3490


What are the Roles and Responsibilities of BDM in IT Industry ? And Tell me some thing about about IT industries

4422


what is the difference between BI and BW security?

2527


From where I should start to prepare for cat?

2265


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?

2496


How to Cancel SAP PO against Fix transport?

2397


what is capital

2673


what four attribut in business case?

2482


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.

3302


what is erp manufacturing perspective??

4435


why u choose mba after bca?

27512


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

2047


Do you personally involved with Major incident process ? If yes, how do you manage it in your present organization ? explain with real scenario !

1834


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.

2453


How retrive the deleted file frm UAT by doing migration in SAP BO 4.0

2349