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 program to read and print a text file on screen



Write a program to read and print a text file on screen..

Answer / ashwek

/// Using C++

#include<iostream>
#include<fstream>
#include<stdio.h>

int main(){

char Data[200];
ifstream File("FILE_NAME"); //Opening a File

while(File){ //Run until End of file
File.getline(Data, 200); //Read data from file & store in Data (string)
cout<<Data; //Print data
}
File.close();

return 0;
}

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Programming Languages AllOther Interview Questions

where is available in this mantis toturials?

0 Answers  


Urgent Openings for Java and .NET ( India, Singapore, Australia, Japan)

6 Answers   CTS,


Diff between IF and where ?

0 Answers   Accenture,


What is the requirement in MIMD ?

1 Answers   Honeywell,


Is buffer size and file block size is similar? If similar,at which case it will be same size?

0 Answers  


what is the maximam caption size of lebel

1 Answers  


what is the diff bw sql direct and jdbc update can't we do select and updating operation in sql direct

0 Answers   HP,


how can we implement locks in plsql?

0 Answers  


I want Ada programming language books. Could anyone post me any link for that?

0 Answers  


what is the exact full form of OOPS,O -> object O -> oriented P -> programing S-> ? ....

16 Answers  


needs examples for black box testing and white box testing

1 Answers   CTS, IBM, Wipro,


what is static objects in java

2 Answers  


Categories