Flowchart & Pseudocode
Syntax and Data Types
Variables
Arithmetic Operators
5

What is a flowchart?

A flowchart is a graphical representation of a process or algorithm using symbols to show the steps and flow of control.

5

What is the basic structure of a C program?

The basic structure includes a header, main() function, variable declarations, and statements inside curly braces {}.

5

What is a variable in C programming?

A variable is a named storage location in memory that holds a value, which can change during the execution of a program.

5

List four basic arithmetic operators in C.

+ (addition), - (subtraction), * (multiplication), / (division).

10

What is pseudocode?

Pseudocode is a plain language description of the steps in an algorithm or program, written in a way that is easy to understand but not tied to any specific programming language.

10

Name three primary data types in C.

int, float, char.

10

What is the syntax to declare an integer variable in C?

int variable_name;

10

What will be the result of the following expression in C? 

int result = 10 / 3; printf("%d", result);

3 (integer division discards the remainder)

15

What symbol is typically used to represent a decision in a flowchart?

A diamond shape is used to represent a decision point in a flowchart.

15

What will be the output of the following code?

int x = 5; 

x = 10;

printf("%d", x);  

10

15

Explain the difference between a local variable and a global variable.

A local variable is declared inside a function and can only be accessed within that function. A global variable is declared outside all functions and can be accessed by any function in the program.

15

Explain the difference between the ++ and -- operators in C.

The ++ operator increments a variable’s value by 1, while the -- operator decrements it by 1.

20

Write pseudocode for a program that checks if a number is positive or negative.

Start

    Input number

    If number > 0

        Print "Positive"

    Else

        Print "Negative"

End


20

Explain the difference between int and unsigned int data types in C.

An int can store both positive and negative integers, whereas an unsigned int can only store non-negative integers (positive values and zero).

20

What is the difference between variable declaration and variable initialization?

Declaration tells the compiler to reserve memory for a variable without assigning a value. Initialization both declares and assigns a value to the variable.

20

Write a C program that takes two integer inputs and prints their sum.

int main() {

    int a, b;

    printf("Enter two numbers: ");

    scanf("%d %d", &a, &b);

    printf("Sum: %d\n", a + b);

    return 0;

}


M
e
n
u