
160 Chapter 4 • Common Language Runtime
error or not. However, let’s look at the following C code that attempts a similar
operation:
int i = 1;
char s[5] = "Hello";
printf("%d", i + s);
Running this code will not raise an error at all. It outputs a large number and
continues on without a glitch.This is because C handles strings differently than
Visual Basic does. C really has no concept of the string data type, and it imple-
ments them as character arrays. Because arrays are treated as pointers in C, it
simply adds the integer value 1 to the number value of the array’s location in
memory (you can show this by outputting the value of &s as well).These two ...