BCA_First_Sem_C_Programming_Questions
BCA_First_Sem_C_Programming_Questions
1. Define a variable in C.
Keywords are reserved words with special meanings. Example: int, return, if.
4. What is a pointer in C?
A pointer stores the memory address of another variable. Example: int *ptr;
5. Define an array in C.
An array is a collection of elements of the same type. Example: int arr[5] = {1, 2, 3, 4, 5};
Example:
#include <stdio.h>
int main() {
int a = 10;
return 0;
Example:
#include <stdio.h>
int main() {
int num;
scanf("%d", &num);
return 0;
Example:
int i = 1; while(i<=3){printf(i);i++;}
int j = 1; do{printf(j);j++;}while(j<=3);
Example:
#include <stdio.h>
int main() {
scanf("%d", &n);
int arr[n];
return 0;
Example:
#include <stdio.h>
int main() {
return 0;
#include <stdlib.h>