Write a program using string function that determines if the input word is a
palindrome. A palindrome is a word that produces the same word when it is
reversed.
Enter a word: AHA
Reversed word: AHA
It is a palindrome.
Write a program that accepts string from the user and allow the user to delete a specified character from a string inputted.
Write an encryption and decryption program using string functions which will display the substitution method of corresponding characters.
* A
$ E
/ I
+ O
- U
Write a program using string function that determines if the input word is a palindrome. A palindrome is a word that produces the same word when it is reversed.
Write a program using standard string functions that accepts a price of an item and display its coded value and tag price (vice versa). The base of the key is:
C O M E A N D B U Y
1 2 3 4 5 6 7 8 9 0
main.c
#include <stdio.h>
#include "challenge.c"
static float a = 8.4;
int main() {
printf(“%f\n”, foo(a) + bar(a));
return 0;
}
challenge.c
#include "challenge2.c"
static float a;
float foo(float F) {
a = 3.6;
return bar(F) * a
}
challenge2.c
static float a;
float bar(float F) {
a = 3.8;
return F * a;
}
Given the source code above and that we use "gcc main.c -o challenge" to compile it, what is the output when we type ./challenge?
challenge.h
#include <stdio.h>
float foo(float F);
float bar(float F);
main.c
#include "challenge.h"
float a = 6.8;
int main() {
float fa = foo(a);
float ba = bar(a);
printf(“%.1f\n”, fa + ba);
return 0;
}
challenge.c
#include "challenge.h"
extern float a;
float foo(float F) {
a = 2.6;
return F * a
}
challenge2.c
#include "challenge.h"
static float a;
float bar(float F) {
a = 5.2;
return foo(F) * a;
}
Given the source code above and we use "gcc main.c challenge.c challenge2.c -o challenge" to compile it. What's the output when we type ./challenge
challenge.h
#include <stdio.h>
float foo(float F);
float bar(float F);
main.c
#include "challenge.h"
float a = 8.5;
int main() {
float fa = foo(a);
float ba = bar(a);
printf(“%.1f\n”, fa + ba);
return 0;
}
challenge.c
#include "challenge.h"
extern float a;
float foo(float F) {
a = 7.3;
return F * a
}
challenge2.c
#include "challenge.h"
extern float a;
float bar(float F) {
a = 7.5;
float ff = foo(F);
return ff * a;
}
Given the source code above and we use "gcc main.c challenge.c challenge2.c -o challenge" to compile it. What's the output when we type ./challenge
Write a program that allows the user to enter students’ names followed by their test scores and
outputs the following information (assume that maximum number of students is 50). Note you will
need to make use of an array.
a. The average score.
b. Names of all students whose test scores are below the average, with an appropriate
message.
c. Highest test score and the name of all students having the highest score.
Write a program that asks the user to enter an integer and determines whether it is divisible by 5 and
6, whether it is divisible by 5 or 6, and whether it is divisible by 5 or 6 but not both.