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

What are the functions to open and close the file in c language?

1 Answers  


Explain the difference between getch() and getche() in c?

1 Answers  


What does a derived class inherit from a base class a) Only the Public members of the base class b) Only the Protected members of the base class c) Both the Public and the Protected members of the base class d) .c file

1 Answers  


how can i include my own .h file EX:- alex.h like #include<alex.h>, rather than #include"alex.h"

1 Answers  


Can an array be an Ivalue?

1 Answers   EXL,


A.C func() { pritnf(" in fuction %d",MACRO); } MAIN.c testfunc() { #define MACRO 10 printf("in test function %d", MACRO); } main() { printf("in main %d",MACRO); func(); testfunc(); getch(); }

2 Answers   Wipro,


Differentiate between full, complete & perfect binary trees.

1 Answers  


What is cohesion in c?

1 Answers  


Explain how do you determine a file’s attributes?

1 Answers  


What should malloc() do?

1 Answers  


What is the difference between malloc() and realloc()?

2 Answers  


what do you mean by enumeration constant?

1 Answers  


Categories