Answer Posted / vadivel t
2's compliment of a -ve no is, positive value of the same
no.
#include<stdio.h>
#include<conio.h>
void main()
{
int no1, res;
printf("ENTER THE NEGATIVE NO: \n");
scanf("%d", &no1);
no1 = ~(no1);
res = no1 | 0x01;
printf("\nRESULT: %d", res);
getch();
}
| Is This Answer Correct ? | 0 Yes | 5 No |
Post New Answer View All Answers
Why is void main used?
Explain what is the most efficient way to store flag values?
What is the difference between far and near ?
For what purpose null pointer used?
Is void a keyword in c?
Explain the priority queues?
What are reserved words?
What is NULL pointer?
why arguments can generally be passed to functions a) sending the values of the arguments b) sending the addresses of the arguments c) a & b d) none of the above
Sir,please help me out with the code of this question. Write an interactive C program that will encode or decode multiple lines of text. Store the encoded text within a data file, so that it can be retrieved and decoded at any time. The program should include the following features: (a) Enter text from the keyboard, encode the text and store the encoded text in a data file. (b) Retrieve the encoded text and display it in its encoded form. (c) Retrieve the encoded text, decode it and then display the decoded text. (d) End the computation. Test the program using several lines of text of your choice.
Can I initialize unions?
What is nested structure?
What is a string?
Can a program have two main functions?
Describe how arrays can be passed to a user defined function