main()
{
char str1[] = {‘s’,’o’,’m’,’e’};
char str2[] = {‘s’,’o’,’m’,’e’,’\0’};
while (strcmp(str1,str2))
printf(“Strings are not equal\n”);
}
Answer / susie
Answer :
“Strings are not equal”
“Strings are not equal”
….
Explanation:
If a string constant is initialized explicitly with
characters, ‘\0’ is not appended automatically to the
string. Since str1 doesn’t have null termination, it treats
whatever the values that are in the following positions as
part of the string until it randomly reaches a ‘\0’. So str1
and str2 are not the same, hence the result.
| Is This Answer Correct ? | 2 Yes | 1 No |
how to test pierrot divisor
#include<stdio.h> int main() { int a=3,post,pre; post= a++ * a++ * a++; a=3; pre= ++a * ++a * ++a; printf("post=%d pre=%d",post,pre); return 0; }
To Write a C program to remove the repeated characters in the entered expression or in entered characters(i.e) removing duplicates. String contains only lowercase characters ['a'-'z']
main() { char *p; int *q; long *r; p=q=r=0; p++; q++; r++; printf("%p...%p...%p",p,q,r); }
Display the time of the system and display the right time of the other country
can you use proc sql to manpulate a data set or would u prefer to use proc report ? if so why ? make up an example and explain in detail
What is the output for the program given below typedef enum errorType{warning, error, exception,}error; main() { error g1; g1=1; printf("%d",g1); }
Write a procedure to implement highlight as a blinking operation
Print an integer using only putchar. Try doing it without using extra storage.
void main() { int i=10, j=2; int *ip= &i, *jp = &j; int k = *ip/*jp; printf(“%d”,k); }
How we will connect multiple client ? (without using fork,thread)
main() { char *p = "hello world"; p[0] = 'H'; printf("%s", p); } a. Runtime error. b. “Hello world” c. Compile error d. “hello world”