Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What is a void * in c?

1061


What extern c means?

990


Explain c preprocessor?

1094


What the different types of arrays in c?

1052


Which is better between malloc and calloc?

1190


What is the difference between struct and typedef struct in c?

1114


In c programming typeing to occupy the variables in memory space. if not useing the variable the memory space is wasted.ok, how to avoid the situation..? (the variable is used & notused)

2106


What is character constants?

1168


i want to know the procedure of qualcomm for getting a job through offcampus

2453


what does static variable mean?

1088


How will you print TATA alone from TATA POWER using string copy and concate commands in C?

1359


how should functions be apportioned among source files?

1089


Explain the meaning of keyword 'extern' in a function declaration.

1141


What is the scope of global variable in c?

979


Can you please explain the difference between malloc() and calloc() function?

1104