I finally did it. This program works. The question is solved.
#include <stdio.h>
#include <string.h>
int main(){
FILE *fp = fopen("data.txt", "r+");;
char c;
while ((c =...
Type: Posts; User: perrrson
I finally did it. This program works. The question is solved.
#include <stdio.h>
#include <string.h>
int main(){
FILE *fp = fopen("data.txt", "r+");;
char c;
while ((c =...
CommonTater, I need to make the changes in the same file.
I tried modifying the program in this way:
#include <stdio.h>
#include <string.h>
int main(){
FILE *fp = fopen("data.txt", "r+");;
char c;
int l = 0;
Hi,
I have to write a program that replaces all vowels in a given file with *. Here's my code:
#include <stdio.h>
#include <string.h>
int main(){
FILE *fp = fopen("data.txt", "r+");;
Wait, my question is solved. The program now reverses the last word too. Here's the modified final code:
#include <stdio.h>
#include <string.h>
int main(){
char str[100];
char temp[100];...
Thanks JohnGraham! That solves a big part of the problem.
But it is still not printing the reverse of the last word of the string. For example, when the input is "Hello how are you", the program...
Hi, I have written a program to reverse words in a string. So if the input is: "My name is Jack", the output should be "yM eman si kcaJ".
But my program is not outputting anything.
...
Hi, I would like to know what function should I use if I want the user to input a string with the new-line character. fgets terminates reading after a new-line character is found.
Hi all,
I have got a tough assignment. I have to write a program that accepts a square matrix, and then print the matrix in circular form. For example, for the matrix:
1 2
3 4
The program...
Thank you. Your solutions worked.
#include <stdio.h>
#include <string.h>
int main(){
char changeschedule;
char moviename[50];
int showtime;
int screennumber;
char addanothermovie;
char mname[50];