Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Two's compliment of -5

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


Please Help Members By Posting Answers For Below Questions

Differentiate Source Codes from Object Codes

1477


What are variables c?

997


What is the advantage of an array over individual variables?

1186


What is this pointer in c plus plus?

1025


In this assignment you are asked to write a multithreaded program to find the duplicates in an array of 10 million integers. The integers are between -5000,000 to 5000,000 and are generated randomly. Use 10 threads, each thread works on 1000,000 integers. Compare the time needed to accomplish the task with single thread of execution program. Do not include the time to fill the array with integers in the execution time.

3066


Why do we use return in c?

950


What is difference between structure and union in c programming?

1013


What is a volatile keyword in c?

1111


What are the different categories of functions in c?

1081


What is a dynamic array in c?

1070


what are the advantages of a macro over a function?

1093


Write a program that accept anumber in words

1708


Write a program to swap two numbers without using third variable?

1246


What is sizeof in c?

954


How many keywords are there in c?

1019