c pgm count no of lines , blanks, tabs in a para(File concept)
Answer Posted / shanker khandelwal (bce mohali
include <stdio.h>
void main()
{
FILE *FP;
char Ch;
int l=o,b=0,t=0,p=0;
FP = fopen(filename, mode);
while (FP) {
if(ch==EOF)
break;
l++;
if(ch==" ")
b++;
if(ch=="\n")
p++;
if(ch=="\t")
t++;
fclose(fp);
display counts;
getch();
}
| Is This Answer Correct ? | 16 Yes | 10 No |
Post New Answer View All Answers
How do you define a string?
Explain what is the use of a semicolon (;) at the end of every program statement?
What could possibly be the problem if a valid function name such as tolower() is being reported by the C compiler as undefined?
Explain what is output redirection?
What is use of integral promotions in c?
What is the explanation for modular programming?
Hai sir, I had planned to write the NIC scientific engineer exam , plz post the sample question......
Is file a keyword in c?
What is function prototype?
By using C language input a date into it and if it is right?
What is union and structure?
Who developed c language and when?
Badboy is defined who has ALL the following properties: Does not have a girlfriend and is not married. He is not more than 23 years old. The middle name should be "Singh" The last name should have more than 4 characters. The character 'a' should appear in the last name at least two times. The name of one of his brothers should be "Ram" Write a method: boolean isBadBoy(boolean hasGirlFriend , boolean isMarried, int age , String middleName , String lastName , String[] brotherName); isHaveGirlFriend is true if the person has a girlfriend isMarried is true if the person is married age is the age of the person middleName is the middle name of the person lastName is the last name of the person brotherName is the array of the names of his brothers
Explain what is the benefit of using enum to declare a constant?
how much salary u want ? why u join in our company? your domain is core sector why u prefer software ?