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 the similarity between networking devices?
10.Define filters,binary to hexadecimal,hexadecimal to decimal?
What do you understand by modular programming?
how do i create my own exception class which will restrict IO exception?
In an customer exit (include Z) program, only the last record is getting fetched. The exit is getting called after pressing save button. What to write for fetching the first record ? Before saved to a SAP table how can i call all these records in an itab in the exit ?
< DL Compact > tag is used for
1. Write a program to create a sentence at runtime and count number of vowels in it ? 2. Write a program to get a string and to convert the 1st letter of it to uppercase ?
hoe to data grid use in sql server 2000?
Is the IT field raise again? What is the position of IT after 4 years?
Differevce between arrays and array builders?
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?
what will we require to build project with the help of oracle
Explain the difference between an expert and a novice user. How would your strategy for designing user interfaces for an expert user differ from that for designing user interfaces for a novice user.
Write a shell program. Enter number of days from keyboard. Find out the number of years, month and days it contains
Colors specified with the notation