CSAPP practice problems and solutions-2

2.5

2.1.4 Representing Strings

2.7

problem

What would be printed as a result of the following call to show_bytes?
const char *m = “mnopqr”;
show_bytes((byte_pointer) m, strlen(m));
Note that letters ‘a’ through ‘z’ have ASCII codes 0x61 through 0x7A.

solution

2.1.6 Introduction to Boolean Algebra

2.1.7 Bit-Level Operations in C

2.1.8 Logical Operations in C

!(x ^ y)

2.1.9 Shift Operations in C

2.3.8

2.4.6 Floating Point in C

Licensed under CC BY-NC-SA 4.0
Last updated on Dec 03, 2024 19:18 +0800