Quick Test 11,12: Modular Programming

1. What word in C indicates that the function will not return anything?

2.  What are the advantages of writing modules

1: 
2: 

3. What will be the result of the next program?
#include<stdio.h>
void write_N(float r, int n)
{
  printf("%f" ,r);
}

void main()
{
  float x;
  x = 10.0;
}
10.0
r
x
This program doesn't have output. We forgot to CALL the function!

4. Why we don't have to initialize a parameter?

A parameter cannot change its value.
The initialization comes from the function call.
Parameters are automatically set to 0.
Not true! Parameters are like normal variables and have to be initialized in the beginning of the function.