Download Practical C Programming - International Research Institute MICA
Transcript
Answers
343
portable is not easy. Still, if you keep portability in mind when creating the code,
you can minimize the problems.
Answers
Answer 20-1: The variable zip is a long int. The printf specification %d is for a
normal int, not a long int. The correct specification is %ld to indicate a long:
printf("Zip code %ld\n", zip);
Answer 20-2: The problem is that C uses the backslash (\) as an escape character.
The character \r is a carriage return, \n is newline, and \t is a tab. What we
really have for a name is:
<return>oot<newline>ew<tab>able
The name should be specified as:
const char NAME[] = "\\root\\new\\table";
NOTE
The #include uses a filename, not a C string. While you must use
double backslashes (\\) in a C string, in an #include file, you use
single backslashes (\). The following two lines are both correct:
const char NAME[] = "\\root\\new\\table";
#include "\root\new\defs.h"
Related documents
Filter Service
EPIO User Manual - Digalog Systems, Inc.
Model 2520Pulsed Laser Diode Test System User`s Manual
Cycle-PO4 Manual
A SERIES OF SHORT EGS5 TUTORIALS
What is IDEA?
Download, 3.57 MB
CHICKEN User`s Manual - The User`s Manual
to the Owners Manual for the pureHeat 2-in
M362-4 and -9 UPS USER MANUAL
86120B User Manual - Custom-Cal
FP-550 User`s Manual