Answered step by step
Verified Expert Solution
Question
1 Approved Answer
#include #include main() { int i,a; char s[3],t[2]; s[0]='B'; s[1]='c'; s[2]='0'; t[0]='B'; t[1]='0'; i=0; a=0; while (a == 0) { if (s[i] < t[i]) a=-1;
#include
#include
main()
{
int i,a;
char s[3],t[2];
s[0]='B'; s[1]='c'; s[2]='\0';
t[0]='B'; t[1]='\0';
i=0; a=0;
while (a == 0)
{
if (s[i] < t[i]) a=-1;
if (s[i] > t[i]) a=1;
if (s[i] == '\0' || t[i] == '\0')
break;
i++;
}
printf("%d ",a);
a=strcmp(s,t);
printf("%d ",a);
}
answer the following questions: last value of t[0]: | |
second value of a | |
last value of i | |
last value of a | |
First value of a | |
Total memory space used by the program in bytes: |
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started