C Programming Questions and Answers
C Programming Questions and Answers
1. What is a variable in C?
A variable in C is a named memory location used to store a value. The value can be changed during
program execution.
Example:
3. What is an operator?
Types of Operators:
- Arithmetic: +, -, *, /, %
#include <stdio.h>
int main() {
int a = 10, b = 5;
return 0;
An array is a collection of variables of the same type stored in a contiguous memory location.
Example:
#include <stdio.h>
int main() {
int i;
return 0;
#include <stdio.h>
int main() {
int i, sum = 0;
sum += arr[i];
return 0;
|-----------|-----------------|------------|