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
How to get the index of the clicked field in reports in ABAP?
what is delegate and delegation model give the real live example on delegate model
Which language they use during interview?
< DL Compact > tag is used for
could you please tell me how to draw the calibration curve for HPLC {the software which we are using}?
hi this is uday i want prepare for nic exam if any one have previous question papers please send me or atlest guide me how to prepare my ID is udaykiran4u@in.com
Given n red balls and m blue balls and some containers, how would you distribute those balls among the containers such that the probability of picking a red ball is maximized, assuming that the user randomly chooses a container and then randomly picks a ball from that.
how can we implement locks in plsql?
in IBM PC -AT.WAT AT REFERS TO?
Define Form modules, Class modules and Standard modules
can we extend a class having only one parameterised constructor.Suggest the process to do it.
WHAT IS MAIN IMPORTANT THING IN SOFTWARE?
In JCl , we have COND parameter.This holds comparison code and condition.It also has only and even parameters. ex: COND((4,GE),EVEN).what the comma mean here. is that 'and' or 'or'.
What's the difference b/w Table & Templete in Smartform?
how does database connection using ADO.NET?