-
What is the condition for a while loop to go until the input is a new line?
( (c = getchar() ) != '\n' )
-
What is the condition for a while to loop until EOF?
( (c = getchar() ) != EOF)
-
What is the format for a do while loop?
do{ } while (condition);
-
star pointer returns what?
The values stored at the location
-
pointer returns what?
The address location
-
What is the name of the default variable storage class?
auto
-
What is name of storage class which memory alloc remains after block ends?
extern
-
What type of storage class retains it's prevous value?
static
-
How do I print a floating point # in scientific notation?
%e, %E
-
How do I print a decimal with at least 3 digits, filled in w/ leading zeros.
%03d
-
How do I print a pointer address?
%p
-
How to print a string?
%s
-
How to left justify a printed value?
- ie. %-s
-
-
For printing, what is the layout code?
width.precision
-
How to print 0004.50
%07.02f
-
What is the function to generate a random number?
srand(int seed)
-
What returns the current time?
time(time_t tp)
-
How do you initialize a file pointer?
FILE *name;
-
How do you open a file?
fopen("string.txt", "r")
-
What is the condition to check for a null pointer
(pointer == NULL)
-
How do you scan a file?
fscanf(filePointer, "%d", &value)
-
How do you change the buffer of scanf?
setbuf()
-
How do you print to a file?
fprintf(filePointer, "%d", value)
-
How do you close a file?
fclose(filepointer)
-
How do you clear the buffer?
fflush(filePointer);
-
How do you write to standard error?
fprintf(stderr, "message %s", string)
-
How do you write to binary files?
fwrite()
-
How do you read from binary failes?
fread()
-
How do you find out how many bytes from start is filepointer?
fseek(filepointer)
-
How do you offset the filepointer in bytes?
fseek()
|
|