Display Message in a file C program
/*Display Message*/ #include<stdio.h> #include<conio.h> main() { char str[30]="Hello World"; FILE *p; p=fopen("a.txt","w"); fprintf(p,"%s",str); fclose(p); }
Display Message in a file C program Read More#include<stdio.h> #include<conio.h> main() { char name[50]; char address[50]; char telno[50]; FILE *fp; int i,n; fp=fopen("a.dat","a"); printf("How many records:"); scanf("%d",&n); for(i=0;i<n;i++) { printf("\nEnter the name:"); scanf("%s",name); printf("\nEnter the address:"); scanf("%s",address); printf("\nEnter …
N number of Name, address,phone in a file and display in proper format in C Program Read More/*sum of N integer using recursion*/ #include <stdio.h> int sum(int n); main() { int number, result; printf("Enter a positive integer: "); scanf("%d", &number); result = sum(number); printf("sum = %d", result); …
Sum of N integer using recursion Read More/*Sort the names into alphabetical order using structure*/ #include<stdio.h> #include<conio.h> #include<string.h> main() { char temp_name[50],temp_add[50]; int i,j,n; struct people { char name[50]; char add[50]; } p[200]; printf("Enter the number of …
Sort the names and address into alphabetical order using structure Read More