what is the use of ~ in c lang?????

Answers were Sorted based on User's Feedback



what is the use of ~ in c lang?????..

Answer / c.p.senthil

Agree with answer 2.
~ is used to find the 1's complement of any number
ex:
a = 0xCA (in hex) => 11001010 (in binary)
~a = 0x35 (in hex) => 00110101 (in binary)

Is This Answer Correct ?    5 Yes 0 No

what is the use of ~ in c lang?????..

Answer / bikash

~ is used to complement a hex value.
eg a = ~0x01;
//now a will have 0xFE;

Is This Answer Correct ?    2 Yes 0 No

what is the use of ~ in c lang?????..

Answer / guest

we r using this key word for equal and shine operator

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More C Interview Questions

Explain how do you print only part of a string?

0 Answers  


write a c/c++ programthat connects to a MYSQL server and checks if the INNoDB plug in is installed on it.If so your program should print the total number of disk writes by MYSQL.

0 Answers   BirlaSoft,


Why preprocessor should come before source code?

2 Answers  


Explain what is the difference between far and near ?

0 Answers  


PROGRAM TO WRITE CONTENTS OF 1 FILE IN REVERSE TO ANOTHER FILE,PROGRAM TO COPY 1 FILE TO ANOTHER BY SPECIFYING FILE NAMES AS COMMAND LINE

0 Answers  






What are Macros? What are its advantages and disadvantages?

0 Answers   TCS,


Is c procedural or object oriented?

0 Answers  


what is the difference between getch() and getchar()?

10 Answers   Huawei, Infosys,


please help me..... please codes and flowchart plz turbo c lang po yan.....please asap response... 3. Make an astrology program. The user types in his or her birthday (month, day, and year as integer), and the program responds with the user’s zodiac sign, horoscope, and other information related to it. If the user’s birth year falls into a leap year, your program should display an appropriate message for it. NOTES: Conditional Statements: it should be with graphics

0 Answers  


Is c++ based on c?

0 Answers  


If jack lies on Mon, Tue Wed and jill lies on Thursday, Friday and Saturday. If both together tell they lied yesterday. So c the given options and then c cos in the given dates one will be saying the truth and one will be lying. I got Thursday as option because jack is saying the truth he lied yest but jill is lying again as he lies on that day.

0 Answers   TCS,


what are the advantages of a macro over a function?

0 Answers   TCS,


Categories