main()
{
int i=-1;
-i;
printf("i = %d, -i = %d \n",i,-i);
}
Answer / susie
Answer :
i = -1, -i = 1
Explanation:
-i is executed and this execution doesn't affect the value
of i. In printf first you just print the value of i. After
that the value of the expression -i = -(-1) is printed.
| Is This Answer Correct ? | 6 Yes | 1 No |
Write a program that produces these three columns sequence nos. using loop statement Sequence nos. Squared Squared + 5 1 1 6 2 4 9 3 9 14 4 16 21 5 25 30
#include <stdio.h> #define a 10 main() { #define a 50 printf("%d",a); }
Code for 1>"ascii to string" 2>"string to ascii"
1 Answers Aricent, Global Logic,
find A^B using Recursive function
String copy logic in one line.
What is the subtle error in the following code segment? void fun(int n, int arr[]) { int *p=0; int i=0; while(i++<n) p = &arr[i]; *p = 0; }
Program to find the largest sum of contiguous integers in the array. O(n)
Cau u say the output....?
Write a C program to add two numbers before the main function is called.
Implement a t9 mobile dictionary. (Give code with explanation )
1 Answers Amazon, Peak6, Yahoo,
int main() { int x=10; printf("x=%d, count of earlier print=%d", x,printf("x=%d, y=%d",x,--x)); getch(); } ================================================== returns error>> ld returned 1 exit status =================================================== Does it have something to do with printf() inside another printf().
main() { char p[ ]="%d\n"; p[1] = 'c'; printf(p,65); }