C Language (general)
Linux
Pointers and Arrays
Input and Output
100

If you pass a variable by VALUE as a parameter to a function, in what way could your variable be modified by the function? 

What is, "in no way"?

If you pass a variable by reference, the function can go to the memory address where your variable lives and modify it.

100

To send the output of one command in as input to another command, one can  use this character.

What is "|", the pipe character?

100

What will the output be from executing a.out?

What is 3?

100

These three files are already open and can be used immediately to bring your program to life!

What are stdin, stdout, and stderr?

200

Why will the compiler complain when we compile ps100.c?

What is "func is a void function that returns a value"?

200

What will be displayed in the terminal after the grep program is executed?

What is "cis212 is a fun course!"?

200

What will the output be from executing a.out?

What is 1 2?

200

printf, fprintf, scanf, fopen, fclose... (tons of useful IO and more) can be used by including this header file.

What is stdio.h?

300

How many bytes are allocated on the heap by this program? 

What is 32?

300

Someone with this access would have permission to execute cis212

What is other?

300

Assume you have an int ** variable (pointer to int pointer) = 0x1000. What address will be stored in your variable after incrementing it two times?

What is 0x1010?

300

What will be output upon executing a.out >tmp.out?

What is Ahh!!!?

400

What will be output upon executing a.out?

What is 10 5?

400

What will be output by the executing the following commands? Note 'tr' is translate and '-' in this case means read from stdin.

What is nothing?

400

What will the output be of executing a.out?

What is 5?

400

If unsuccessful, fopen() will return NULL. Otherwise, it returns this.

What is FILE *?

500

What will be displayed in the terminal after executing a.out with its numerous arguments?

What is "./a.out , is "?

500

Say you have a file with 20 lines and you want to print lines 11-15 by connecting the input and output of head, cat, and tail (not necessarily in this order) using a pipe. Executing this command would give you your desired output.

What is "cat file | head -15 | tail -5"

OR

What is "cat file | tail -10 | head -5"?

500

What will the below program output?

What is 12?

500

What does the following line reveal about io100.c?

what is "io100.c has the fewest lines of the files we called wc on"?

M
e
n
u