Write a program to read and print a text file on screen
Answer Posted / 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 View All Answers
I am looking for selenium RC online Training in chennai. can any one tell me the best institute
How do i find out the number of parameters passed into function?
which book we learned this mantis? how many version are realsed this mantis upto now?
how CLR identify vb file?
Write a shell program. Enter number of days from keyboard. Find out the number of years, month and days it contains
can u send some model papers how computer awareness questions are asked in goverment jobs(oriental insurance)to my mail id me.priyankapadma@rediff.com
through which algorithm does the garbage collector works? how the garbage collector will understand that the object will going to be deleted?
how can i create report in abap to insert data in table pa0002 using insert command
Q2. A memory location has physical address D5687h. Compute: a. The offset address if the segment number is D445h. b. The segment number if the offset address is B577h.
In mainframe SDSF, Can we copy the list of jobs currently executing in SDSF in to a seperate DATASET...?
what is the BAM? where we can use it in BizTalk server?
hi all, i need ur help in preparing a sql which performs scd2, i mean i have a scd2 mapping i need a sql which can give me same result as scd2 mapping, SRC table: cust_no, loc 01 abc 02 xyz TGT table: pm_ky cust_no loc current_flag 1 01 abc Y 2 02 xyz Y cust 1 has changed his loc to xyz then it loads into TGT table as below, pm_ky cust_no loc current_flag 1 01 abc N 2 02 xyz Y 3 01 xyz Y i need sql to get the above result, hope got me question, Any suggestion will be appreciate.. thanks, Vinod
iam confused among testing ,.net and java. can anybody help me.
how to add a new table with variables and thier values into a imported file uisng proc import?
What is the first message line that any language learning prints on the screen? and why?