Answer to Question #53019 in C for sofia

Question #53019
how can i get the right output?

#include <stdio.h>


int main( )
{
char status[] = {'s','i','m','p','l','e' } ;
char i, x ;



printf ( "Enter character to search: " ) ;
scanf ( "%c", &x ) ;

for(i=0;i<=5;i++)
{
if ( status[5] < x || status[i] >= x )
{
if ( status[5] == x)
printf ( "The character is at position %d in the array.", i ) ;
else
printf ( "character is not present in the array." ) ;
break ;
}
}

}
1
Expert's answer
2015-06-11T00:00:41-0400
The answer to the question is available in the PDF file https://www.assignmentexpert.com/homework-answers/programming-answer-53019.pdf

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS