DATA-FILE-HANDLING-QUESTION-BANK-XII-CS
Q1. Write a function in C++ to count and display the number of line starting with alphabet ‘A’ present in a text file “LINES.TXT”. Example: if the file LINES.TXT contains the following lines: A boy is playing there. There is a playground. An airplane is in the sky. Alphabets and numbers are allowed in the password. Then the function should display the output as 3 . ………………ANSWER………………………….. #include<fstream.h> #include<conio.h> void main() { ifstream file("LINES.txt",ios::in); if(!file) { cout<<" ERROR in OPENING FILE. "; return;} char oneline[80]; int nol=0; ...