I am doing an assignment that requires two input files to be read a record at a time. the loop can only terminate when both codes read "99999". The code I have should produce an infinite loop but ignores the second value.
#include <stdio.h>
#include <string.h>
void main()
{
char a[] = "00000",*a_ptr;
char b[] = "00000",*b_ptr;
while((strcmp(a,"99999"!=0)&&(strcmp(b,"99999"!=0))
{
/* rest of the coding will go here */
strcpy(a,"99999"
strcpy(b,"99990"
}
}
#include <stdio.h>
#include <string.h>
void main()
{
char a[] = "00000",*a_ptr;
char b[] = "00000",*b_ptr;
while((strcmp(a,"99999"!=0)&&(strcmp(b,"99999"!=0))
{
/* rest of the coding will go here */
strcpy(a,"99999"
strcpy(b,"99990"
}
}