#include <stdio.h>
main()
{
char * str = "hello";
char * ptr = str;
char least = 127;
while (*ptr++)
least = (*ptr<least ) ?*ptr :least;
printf("%d",least);
}
Answer / susie
Answer :
0
Explanation:
After ‘ptr’ reaches the end of the string the value pointed
by ‘str’ is ‘\0’. So the value of ‘str’ is less than that of
‘least’. So the value of ‘least’ finally is 0.
Is This Answer Correct ? | 2 Yes | 0 No |
main() { char string[]="Hello World"; display(string); } void display(char *string) { printf("%s",string); }
How do you create a really large matrix (i.e. 3500x3500) in C without having the program crash? I can only reach up to 2500. It must have something to do with lack of memory. Please help!
find simple interest & compund interest
main() { static char names[5][20]={"pascal","ada","cobol","fortran","perl"}; int i; char *t; t=names[3]; names[3]=names[4]; names[4]=t; for (i=0;i<=4;i++) printf("%s",names[i]); }
how to delete an element in an array
what is oop?
How to count a sum, when the numbers are read from stdin and stored into a structure?
main() { while (strcmp(“some”,”some\0”)) printf(“Strings are not equal\n”); }
main() { char *p = "hello world"; p[0] = 'H'; printf("%s", p); } a. Runtime error. b. “Hello world” c. Compile error d. “hello world”
how can i search an element in an array
2 Answers CTS, Microsoft, ViPrak,
Derive expression for converting RGB color parameters to HSV values
main() { int i=5,j=10; i=i&=j&&10; printf("%d %d",i,j); }