Skip to main content
Stack Overflow
  1. About
  2. For Teams
Filter by
Sorted by
Tagged with
0 votes
1 answer
51 views

I'm getting an unintended output from this code. int main() { int var; while ((var = getchar() ) != '\n') { if (var == '\t') printf("\\t"); if (var ...
1 vote
3 answers
1k views

When writing '9' instead of 9 as my char c my endresult becomes negative and wrong for some reason. Why is that? What does '9' do? #include <stdio.h> int main() { int a, b; char c = '9';...
Cryme's user avatar
  • 21
1 vote
1 answer
1k views

The following code fails to compile using GCC: int main() { for(int j=0; j<80; j++) //for every column, { //ch is ‘x’ if column is char ch = (j%8) ? ‘ ‘ : ‘x’; //multiple of 8, and ...
1 vote
0 answers
37 views

Is there a way to enter in a character as an immediate in gas? For example: mov 1,ドル %rax # decimal mov 0ドルxA, %rbx # hex mov 0ドルb100, %rcx # binary mov 'A', %rdx # something like this? I know I ...
0 votes
3 answers
185 views

I've been diving into C/low-level programming/system design recently. As a seasoned Java developer I still remember my attemtps to pass SUN Java Certification and questions if char type in Java can be ...
1 vote
2 answers
460 views

When we compare numbers in a string/character format, how does the c++ compiler interpret it? The example below will make it clear. #include <iostream> using namespace std; int main() { // your ...
5 votes
5 answers
1k views

I have seen and used C++ code like the following: int myFourcc = 'ABCD'; It works in recent versions of GCC, not sure how recent. Is this feature in the standard? What is it called? I have had ...

AltStyle によって変換されたページ (->オリジナル) /