main()
{
int c=- -2;
printf("c=%d",c);
}
Answer / susie
Answer :
c=2;
Explanation:
Here unary minus (or negation) operator is used
twice. Same maths rules applies, ie. minus * minus= plus.
Note:
However you cannot give like --2. Because --
operator can only be applied to variables as a decrement
operator (eg., i--). 2 is a constant and not a variable.
| Is This Answer Correct ? | 18 Yes | 9 No |
What are the following notations of defining functions known as? i. int abc(int a,float b) { /* some code */ } ii. int abc(a,b) int a; float b; { /* some code*/ }
code of a program in c language that ask a number and print its decremented and incremented number.. sample output: input number : 3 321123
void main() { int i=5; printf("%d",i+++++i); }
Write a program to model an exploding firecracker in the xy plane using a particle system
Sorting entire link list using selection sort and insertion sort and calculating their time complexity
1 Answers Infosys, Microsoft, NetApp,
#define max 5 #define int arr1[max] main() { typedef char arr2[max]; arr1 list={0,1,2,3,4}; arr2 name="name"; printf("%d %s",list[0],name); }
main() { int i=_l_abc(10); printf("%d\n",--i); } int _l_abc(int i) { return(i++); }
Print an integer using only putchar. Try doing it without using extra storage.
void ( * abc( int, void ( *def) () ) ) ();
1. const char *a; 2. char* const a; 3. char const *a; -Differentiate the above declarations.
main() { int x=5; clrscr(); for(;x<= 0;x--) { printf("x=%d ", x--); } } a. 5, 3, 1 b. 5, 2, 1, c. 5, 3, 1, -1, 3 d. –3, -1, 1, 3, 5
char *someFun() { char *temp = “string constant"; return temp; } int main() { puts(someFun()); }