main()
{
while (strcmp(“some”,”some\0”))
printf(“Strings are not equal\n”);
}
Answer / susie
Answer :
No output
Explanation:
Ending the string constant with \0 explicitly makes no
difference. So “some” and “some\0” are equivalent. So,
strcmp returns 0 (false) hence breaking out of the while loop.
| Is This Answer Correct ? | 3 Yes | 0 No |
#include<stdio.h> main() { int a[2][2][2] = { {10,2,3,4}, {5,6,7,8} }; int *p,*q; p=&a[2][2][2]; *q=***a; printf("%d..%d",*p,*q); }
#define int char main() { int i=65; printf("sizeof(i)=%d",sizeof(i)); }
how to programme using switch statements and fuctions, a programme that will output two even numbers, two odd numbers and two prime numbers of the users chioce.
0 Answers Mbarara University of Science and Technology,
Is the following code legal? struct a { int x; struct a *b; }
main() { extern i; printf("%d\n",i); { int i=20; printf("%d\n",i); } }
main() { char *p; p="Hello"; printf("%c\n",*&*p); }
create a login program that ask username and password. if you input username or password 3 times wrong, the program will terminate else the program will prompt a message "congratulations"
void main() { int *i = 0x400; // i points to the address 400 *i = 0; // set the value of memory location pointed by i; }
why is printf("%d %d %d",i++,--i,i--);
main() { printf("%x",-1<<4); }
main() { signed int bit=512, mBit; { mBit = ~bit; bit = bit & ~bit ; printf("%d %d", bit, mBit); } } a. 0, 0 b. 0, 513 c. 512, 0 d. 0, -513
3 Answers HCL, Logical Computers,
write a c-program to display the time using FOR loop