main()
{
int i=-1;
+i;
printf("i = %d, +i = %d \n",i,+i);
}
Answer / susie
Answer :
i = -1, +i = -1
Explanation:
Unary + is the only dummy operator in C. Where-ever it
comes you can just ignore it just because it has no effect
in the expressions (hence the name dummy operator).
| Is This Answer Correct ? | 20 Yes | 1 No |
void main() { int c; c=printf("Hello world"); printf("\n%d",c); }
how to print 1 2 3 4 5 6 7 8 9 10 9 8 7 6 5 4 3 2 1 using any loop(for or while) only once(only 1 loop) and maximum 2 variables using C.
19 Answers Cap Gemini, Infosys,
main() { clrscr(); } clrscr();
main() { int i=5; printf("%d",++i++); }
Write a C program to print ‘Campus Force training’ without using even a single semicolon in the program.
main() { printf("%d, %d", sizeof('c'), sizeof(100)); } a. 2, 2 b. 2, 100 c. 4, 100 d. 4, 4
18 Answers HCL, IBM, Infosys, LG Soft, Satyam,
main() { char string[]="Hello World"; display(string); } void display(char *string) { printf("%s",string); }
how to return a multiple value from a function?
Give a very good method to count the number of ones in a 32 bit number. (caution: looping through testing each bit is not a solution)
main() { unsigned char i=0; for(;i>=0;i++) ; printf("%d\n",i); }
Write a c program to search an element in an array using recursion
Given an array of characters which form a sentence of words, give an efficient algorithm to reverse the order of the words (not characters) in it.