#include <stdio.h>
void main (void)
{
int account;
char name[30];
float balance;
FILE *fptr;
if ((fptr= fopen("D:/clients.txt", "w")) == NULL)
printf("Error: the file cannot be opened\n");
else {
printf("Enter the account #, name and balance or EOF to end input:\n");
scanf("%d %s %f",...
User Profile
Collapse
-
-
What is it means by
" missing function header (old-style formal list?)"Leave a comment:
-
i've treid already.
but why this error still there.
error C2065: 'strlen' : undeclared identifierLeave a comment:
-
i can't find the answer. please help
#include<stdio. h>
int count (char letter, const char *my_string);
void main()
{
int total_l;
char my_string[] = “walla la oh la la la la la long”;
char letter = ‘l’;
total_l = count(letter, my_string);
printf(“There are %d character l in the string\n”, total_l);
}
*required to write a recursive function to count the number of times character ‘l’ ... -
Try Out
Write a function header for each function below:
(a) A function named sum_avg() that takes in three floating-point numbers and sends back their sum and average via arguments by reference.
(b) A function named sum_avg() that takes in three floating-point numbers and sends back their sum with the return statement and their average via argument by reference. -
warm up about function swap()
#include<stdio. h>
void swap(int &, int &);
void main(){
int num1, num2;
printf("Enter 2 numbers > ");
scanf("%d%d", &num1, &num2);
if(num1 > num2)
swap(&num1, &num2);
printf("In ascending order: %d %d \n", num1, *num2);
}
void swap(int *a, int b)
{
int...
No activity results to display
Show More
Leave a comment: