Syntax for Declaring a Variable
State the syntax for declaring a variable. Give an example.
Answers
Answered by
6
variable is integer, syntax is,
int i, j, k;
variable is character, syntax is,
char c, ch;
variable is floating point,
float f, salary;
variable is double int,
double d;
int i, j, k;
variable is character, syntax is,
char c, ch;
variable is floating point,
float f, salary;
variable is double int,
double d;
vee11:
#include // Variable declaration: extern int a, b; extern int c; extern float f; int main () { /* variable definition: */ int a, b; int c; float f; /* actual initialization */ a = 10; b = 20; c = a + b; printf("value of c : %d \n", c); f = 70.0/3.0; printf("value of f : %f \n", f); return 0; }
Answered by
1
Answer:
variable is integer, syntax is,
int i, j, k;
variable is character, syntax is,
char c, ch;
variable is floating point,
float f, salary;
variable is double int,
double d;
Explanation:
mark as the brainliest
Similar questions