#include <stdio.h>
#include <stdlib.h>
struct time{int hours, mins, secs;};
int main(int argc, char *argv[])
{
struct time one;
struct time two;
printf("\nplease enter the time in 24 hr format, \nenter the hours, return,\nenter minutes, return, enter seconds, and return.\n");
scanf("%d\n%d\n%d", &one.hours, &one.mins, &one.secs);
int yn;
yn = validateTime(one, yn);
while(!yn){
if (!yn){
puts("Invalid input\nPlease try again");
printf("\nplease enter the time in 24 hr format, \nenter the hours, return,\nenter minutes, return, enter seconds, and return.\n");
scanf("%d\n%d\n%d", &one.hours, &one.mins, &one.secs);
yn = …Run Code Online (Sandbox Code Playgroud) #include <stdio.h>
#include <ctype.h> /*header for standard tolower function*/
#define STRING_LEN 500
char * changeCase(char *);
void stripspaces(char*, char*, char*);
int isinteger(char*);
int isHex(char*);
void strrev(char*);
int main(void)
{
char line[STRING_LEN];
char line1[STRING_LEN];
char *p1 = line;
char *p2 = line;
int ok, ok2;
printf("Enter a string of up to %d characters:\n", STRING_LEN);
while((*p1++ = getchar()) != '\n');
changeCase(line);
puts("resulting string is:\n");
printf("%s", line);
stripspaces(line, p1, p2);
ok = isinteger(line);
if (ok)
{
printf("%s is an integer\n", line);
}
else …Run Code Online (Sandbox Code Playgroud) c ×2