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
Difference of Console, web & windows applications?
Find out the list of authorization objects which contains activity as a field? Thanks in advance.
why we need to take u?
what are the 3 forms of a prolog term
what are the activities you enjoy most and How do you see these Developing in the Future with Reference to in your work life and in your personal life
Write a program that prints the numbers from 1 to 100. But for multiples of three print "Fit" instead of the number and for the multiples of five print "Bit". For numbers which are multiples of both three and five print "FitBit".
Given an array of size n. It contains numbers in the range 1 to n. Find the numbers which aren?t present.
What is SOLID Principle in Programming Language?
Outline the two important features of a terminating recursion. Any ideas?
What for decision coverage and modified condition decision coverage are used? Wat is the difference between them?
what will we require to build project with the help of oracle
4. What is the need of START 0? Instead if can we use any other numeric? If we use what will happen?
how to study PHP my own? i reffered many sites.. but as being a fresher i couldnt follow those... which site will be the best one?
they asked me about srs (software requirement specifcation)? how can i get anydocumentation about srs & other documnts infomation like bdd, in testing? its urgent?
What are the tasks performed by a Team Lead