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

Difference between views and index in sas programming

0 Answers   Ventois,


Hi I am Rathnam, How To Remove the duplicates with out using remove duplicate stage in the datastage

0 Answers   TCS,


What is the meaning of client-server application. The purpose of Client-Server Application. with description.

0 Answers  


what is database?how to tell 3years boy or girl by using toys?

1 Answers  


Given a Binary Search Tree, write a program to print the kth smallest element without using any static/global variable. You can?t pass the value k to any function also.

0 Answers   Amazon,


What is Partial class and its use?

1 Answers  


what is client server & server? What r types of Joins? explsin it! which types of indexex in sql server? what is triggers?

0 Answers  


can php support multiple inheritence?

2 Answers  


how can we implement locks in plsql?

0 Answers  


what is the extension of SPDS Dynamic cluster tables?

0 Answers   IBM,


what is the difference between set and append?

3 Answers   ICICI,


When we use Windows authentication mode

0 Answers  


Categories