For each variable assignment below, fill in the variable type and the final assigned value to it. code example

Example: Write a C program to do the following: (10 marks) a. Declare two variables a and b of type integer b. Initialise the value of variable a to 3 and the value of variable b to 0 c. If the value of a is greater than 0, then assign b the value of a + 3

/*
 * Comment to state the purpose of this program (filename.c)
 */
#include <stdio.h>
 
int main() {
  int a=3,b=0;
  if(a>b){
  b=a+3;
  printf("%d",b);
  }
 
   return 0;
}

Tags:

C Example