c - capitalize first letter in file -


I am trying to capitalize the first letter The character is read from the text file Unfortunately, I can not read an idea that says two boolean variables, which can be of type int: a variable 1, when the current character is a word of a word The other part will hold the variable 1 when the last letter is a part of a word. But, how can I know whether the four words are part or not?

  #include & lt; Stdio.h & gt; Zero CPTP (four x []); Int main () {cptlz ("in.txt"); Return 0; } Void cptlz (char x []) {char ch; Int present, pastoral, cents = 1; File * fptr_in; If ((fptr_in = fopen (x, "r")) == faucet {printf ("Error reading file \ n"); } And {while (cents == 1) {st = fscanf (fptr_in, "% c", & amp; ch); If (ch> = 'a' & amp;;; & lt; = 'z') {printf ("% c", ch-32); } And printf ("% c", ch);  
   

Just try this code.

  void cptlz (char x []) {char ch; Int current, previous thing = '\ n', cents = 1; File * fptr_in; If ((fptr_in = fopen (x, "r")) == faucet {printf ("Error reading file \ n"); } Else {while ((ch = fgetc (fptr_in)) = EOF) {if (ch> = 'a' & amp; amp;; & lt; = 'z' & amp; (previouschar == '\ n' || Inheritance == '')) {printf ("% c", ch-32); } And printf ("% c", ch); Previouschar = ch; }}}  

Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -