PPS q&a question paper of pps in

 What is syntax error?

A syntax error is a mistake in the syntax of a sequence of characters or tokens that is intended to be written in a particular programming languageSyntax errors can occur during the execution of a computer program due to unforeseen conditions or invalid input data. 

Define Pointer

A pointer in the context of computer programming, particularly in languages like C or C++, is a variable that stores the memory address of another variable. It essentially "points" to a location in memory where data is stored. Pointers are used for various purposes, including:

  1. Dynamic memory allocation: Pointers are used to allocate memory at runtime using functions like malloc in C, allowing you to create data structures of variable sizes.

  2. Accessing and modifying data: Pointers can be used to directly access and manipulate the data stored in memory locations, which can be useful for efficient data processing.

  3. Function parameters: Pointers are often used to pass data by reference to functions, allowing them to modify the original data directly, rather than working with copies.

  4. Data structures: Pointers play a crucial role in creating data structures like linked lists, trees, and graphs, where elements are connected through pointers.

  5. Differentiate between structure and union?

  • Structure
    Stores each member in separate memory locations. This allows it to store multiple values of the various members.
  • Union
    Stores all its members in the same memory location. This allows it to store one value at a time for all of its members.
  • img for geeks for geeks
  • Explain different operators available in C?
Operators in C are used to perform operations on data. There are different types of operators in C, each with its own purpose. Here is a summary of the different types of operators in C:

Types of Operators in C:

  1. Arithmetic Operators
  2. Relational Operators
  3. Logical Operators
  4. Bitwise Operators
  5. Assignment Operators
  6. Other Operators

Operators in C are used to perform operations on data. There are different types of operators in C, each with its own purpose. Here is a summary of the different types of operators in C:

Arithmetic Operators

Arithmetic operators are used to perform basic arithmetic operations such as addition, subtraction, multiplication, and division. Examples of arithmetic operators include:

  • +: Addition
  • -: Subtraction
  • *: Multiplication
  • /: Division
  • %: Modulus (remainder of a division)

Assignment Operators

Assignment operators are used to assign values to variables. Examples of assignment operators include:

  • =: Assignment
  • +=Addition assignment
  • -=: Subtraction assignment
  • *=: Multiplication assignment
  • /=: Division assignment
  • %=: Modulus assignment
  • Relational Operators

    Relational operators are used to compare values and determine their relationship. Examples of relational operators include:

    • ==: Equal to
    • !=: Not equal to
    • <: Less than
    • <=: Less than or equal to
    • >: Greater than
    • >=: Greater than or equal to
    • Logical Operators

      Logical operators are used to combine Boolean expressions and form more complex Boolean expressions. Examples of logical operators include:

      • &&: Logical AND
      • ||: Logical OR
      • !: Logical NOT

      Bitwise Operators

      Bitwise operators are used to manipulate individual bits of data. Examples of bitwise operators include:

      • &: Bitwise AND
      • |: Bitwise OR
      • ^: Bitwise XOR
      • ~: Bitwise NOT
      • <<: Left shift
      • >>: Right shift

      Increment and Decrement Operators

      Increment and decrement operators are used to increment (increase) or decrement (decrease) the value of a variable by 1. Examples of increment and decrement operators include:

      • ++: Increment
      • --: Decrement
      • image for geeksforgeeks        

what is an algorithm ? write an algorithm to check weather a number the given number is prime or not



An algorithm is a set of instructions that define a sequence of operations to be performed to solve a specific problem or accomplish a specific task. It is a step-by-step procedure that is designed to be executed by a computer or by a human.

Write an algorithm to find the given number is prime number or not? Step 1 : start Step 2 : Read the value in N Step 3 : set f=0 Step 4 : for i=2 to N-1 step 5 : if N mod i =0 then set f=1 step 6 :if f=1 then print “ number is not a prime number” else print “ number is a prime number “ step 7 : stop

what is Flow chart?

Flowchart is a diagrammatic representation of an algorithm. Flowchart is very helpful in writing program and explaining program to others. Symbols Used In Flowchart

what are the different symbols used used in flow

chart and give an example



Explain in detail about the structure of c program with a sample program 

The structure of a program is defined by its control flow , as structure are built up of blocks of codes.
These block have single entre and single exit ion the control flow.

* Documentation section
* The Link section
* The definition section
* Global Declaration section
* Every C program must have one main ( ) function section. This section contains two parts
declaration part and executable part
* The sub program section

    • program of C

    • topic: to print hello world

    • #include<stdio.h>

    • void main()

    • {

    • print f ("Hello world");

    • return 0;

    • }

 DEFINITION OF ARRAYS
 The array is a fixed-size sequenced collection of elements of same data type.
 The array is a collection of homogeneous elements of same data type.
 Array groups the data items of similar types sharing the common name.
 Arrays are called as subscripted variables because; it is accessed using
                                       TYPES OF ARRAYS
I. One dimensional arrays/Single-Subscripted Variable
II. Two dimensional arrays/Double-Subscripted Variable
III. Multidimensional arrays

I. One-Dimensional Arrays: A list of items can be given one variable name using only one subscript 
and such a variable is called a single subscripted variable or one dimensional array.
                       Ex: int marks[4]

Array of Structures






































































Comments