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...

pgm to find number of words starting with capital letters
in a file(additional memory usage not allowed)(if a word
starting with capital also next letter in word is capital
cann't be counted twice)

Answer Posted / shiva

int flag=0,count=0;
FILE *in=fopen("in.txt","r");
while(!feof(in))
{
if( isupper( fgetc(in) ) && flag==0)
{
flag=1;
count++;
}
else if( fgetc(in) ==' ')
flag=0;
}
printf("Count=%d",count);

// PROGRAM VERIFIED WITH SAMPLE INPUT

Is This Answer Correct ?    28 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the usage of the pointer in c?

1148


What are the modifiers available in c programming language?

1231


What are high level languages like C and FORTRAN also known as?

1177


Can you add pointers together? Why would you?

1134


Why do we use null pointer?

1076


What are reserved words?

1120


Are local variables initialized to zero by default in c?

1057


When do you not use the keyword 'return' when defining a function a) Always b) Never c) When the function returns void d) dfd

1069


What does sizeof return c?

1076


why to assign a pointer to null sometimes??how can a pointer we declare get assigned with a garbage value by default???

1981


write a program fibonacci series and palindrome program in c

1057


Is c easy to learn?

996


What is the role of this pointer?

1078


What is ambagious result in C? explain with an example.

2642


Why can arithmetic operations not be performed on void pointers?

1054