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
What is diffrent between Method and and function in c#
I am looking for NIC Sample papers or any patern of questions/ syllabus plz, send me on hamid.khan135@yahoo.in Regard
What is the Difference between in memory database and physical database
What is the difference beween joblib and steplib statements
Hi Guys, This is Rama, right now I am working as a Software Test Engineer in Gurgoan and I have over all 3 years of testing expoeriance. Right now I am looking for a change. Can any body help me out to find a job in south india. Thanks in Advance
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.
Delta 5 weight scale not connect with oracle application what i can do?
For a binary tree with n nodes, How many nodes are there which has got both a parent and a child?
Given an array of size n+1 which contains all the numbers from 1 to n.Find the number which is repeated in O(n) time.How do you proceed with the same with floating numbers from 0 to 1 instead of 1 to n?
19. Given a system that is described with the following equation, X=A+(B.(A̅+C)+C)+A.B.(D̅+E̅) a) Simplify the equation using Boolean Algebra. b) Implement the original and then the simplified equation with a digital circuit. c) Implement the original and then the simplified equation in ladder logic.
how can i create report in abap to insert data in table pa0002 using insert command
how to work search engine? plz detail answer me.
how to get second highest salary from a employee table and how get a 5th highest salary from a employee table by using proc sql?
3. What is the difference between testing and Quality Assurance?
what is the last ant version you worked?how to get it