C Programming - Input / Output - Discussion
Discussion Forum : Input / Output - Find Output of Program (Q.No. 6)
6.
What will be the output of the program ?
#include<stdio.h>
int main()
{
printf("%c\n", ~('C'*-1));
return 0;
}
Discussion:
32 comments Page 4 of 4.
Satya said:
1 decade ago
@Nik because c language follows the one's complement signed number representation
Nik said:
1 decade ago
How come bitwise not (~) to -67 is 66 , why not 67 itself?
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers