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
write algo for cobol program whichuse three flat file to extract some specific information 8 marks mainframe
4. What is the need of START 0? Instead if can we use any other numeric? If we use what will happen?
EXPLAIN UNARY OPEARATORS
iam confused to choose among testing, .net and java can anybody help me????????
what are all the validation we need to perform in data stage?
where is available in this mantis toturials?
what is the basic and unique feature of dotnet
what is delegate and how works delegate and event.
what are the differences between CONS, LIST, and APPEND
What are the Short cut Keys of Tally ERP?
when will triggars the at new event in abap and web dybn pro?
I want to insert date in the form of yyyy-mm-dd... if any changes happen while inserting date format want to show error meg...any one can solve this..??
Wrtite a JCL for sorting a file with start from 36 postion lenth 9 excluding a num eq to 98768. for 3 marks mainframe
What ports must be open for DCOM over a firewall? What is the purpose of Port 135?
SAS question: I have 50 fils a1,a2,...,a50. the primary key is upc. then if i want to merge all 50 files, the code is as follows, data test; merge a1 ... a50; by upc; run; we know that writing all 50 files name is time consuming, is there any standard format of this code?