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 |
‎#define good bad main() { int good=1; int bad=0; printf ("good is:%d",good); }
union u { struct st { int i : 4; int j : 4; int k : 4; int l; }st; int i; }u; main() { u.i = 100; printf("%d, %d, %d",u.i, u.st.i, u.st.l); } a. 4, 4, 0 b. 0, 0, 0 c. 100, 4, 0 d. 40, 4, 0
Develop a routine to reflect an object about an arbitrarily selected plane
C statement to copy a string without using loop and library function..
How to count a sum, when the numbers are read from stdin and stored into a structure?
main() { struct student { char name[30]; struct date dob; }stud; struct date { int day,month,year; }; scanf("%s%d%d%d", stud.rollno, &student.dob.day, &student.dob.month, &student.dob.year); }
Display the time of the system and display the right time of the other country
main() { extern out; printf("%d", out); } int out=100;
#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); }
Given an array of size N in which every number is between 1 and N, determine if there are any duplicates in it. You are allowed to destroy the array if you like.
21 Answers ABC, eBay, Goldman Sachs, Google, HUP, Microsoft, TATA,
Given a spherical surface, write bump-mapping procedure to generate the bumpy surface of an orange
How will you print % character? a. printf(“\%”) b. printf(“\\%”) c. printf(“%%”) d. printf(“\%%”)