Skip to main content
  1. Resources/
  2. Study Materials/
  3. Electronics & Communication Engineering/
  4. ECE Semester 3/

Programming in C (4331105) - Summer 2025 Solution

16 mins· ·
Study-Material Solutions Programming-C 4331105 2025 Summer
Milav Dabgar
Author
Milav Dabgar
Experienced lecturer in the electrical and electronic manufacturing industry. Skilled in Embedded Systems, Image Processing, Data Science, MATLAB, Python, STM32. Strong education professional with a Master’s degree in Communication Systems Engineering from L.D. College of Engineering - Ahmedabad.
Table of Contents

Question 1(a) [3 marks]
#

How many keywords are there in C? Write any four keywords

Answer:

Total KeywordsExamples
32 keywordsint, float, char, if

Diagram:

graph LR
    A[C Keywords - 32 Total] --> B[Data Types: int, float, char, double]
    A --> C[Control: if, else, for, while]
    A --> D[Storage: static, extern, auto, register]
  • 32 keywords: Total reserved words in C language
  • Data type keywords: int, float, char, double for variable declaration
  • Control keywords: if, else, for, while for program flow

Mnemonic: “Cats In Four Colors” (char, int, float, const)


Question 1(b) [4 marks]
#

What is variable? Explain rules for naming a variable with example

Answer:

Variable Definition:

AspectDescription
DefinitionNamed memory location to store data
PurposeHold values that can change during program execution
Declarationdatatype variable_name;

Naming Rules:

  • First character: Must be letter or underscore (_)
  • Subsequent characters: Letters, digits, underscore only
  • Case sensitive: ‘Age’ and ‘age’ are different
  • No keywords: Cannot use reserved words like ‘int’, ‘float’

Examples:

int age;        // Valid
float _salary;  // Valid
char name123;   // Valid
int 2number;    // Invalid - starts with digit
float for;      // Invalid - keyword used

Mnemonic: “Letters First, No Keywords” (LF-NK)


Question 1(c) [7 marks]
#

Specify errors if any, in the following statements

Answer:

StatementErrorReason
(1) fLoat x;Invalid keywordCorrect: float x;
(2) int min, max = 20;Partial initializationOnly max initialized, min uninitialized
(3) long char c;Invalid combinationCannot combine long with char
(4) iNt a;Invalid keywordCorrect: int a;
(5) FLOAT f=2;Invalid keywordCorrect: float f=2;
(6) double m ; n;Missing datatypeCorrect: double m, n;
(7) Int score (100)0;Multiple errorsInvalid syntax, correct: int score = 100;

Key Points:

  • Case sensitivity: Keywords must be lowercase
  • Multiple declaration: Use comma separator
  • Initialization syntax: Use = operator

Mnemonic: “Keywords Lower Case Always” (KLCA)


Question 1(c) OR [7 marks]
#

What is algorithm? What is flowchart? Draw a flowchart to find area and perimeter of circle.

Answer:

Definitions:

TermDefinition
AlgorithmStep-by-step procedure to solve a problem
FlowchartVisual representation of algorithm using symbols

Flowchart for Circle Area and Perimeter:

flowchart TD
    A[Start] --> B[Input radius r]
    B --> C[Calculate area = π × r²]
    C --> D[Calculate perimeter = 2 × π × r]
    D --> E[Display area and perimeter]
    E --> F[End]

Algorithm Steps:

  • Step 1: Start
  • Step 2: Input radius value
  • Step 3: Calculate area using formula π×r²
  • Step 4: Calculate perimeter using formula 2×π×r

Mnemonic: “Start Input Calculate Display End” (SICDE)


Question 2(a) [3 marks]
#

What is operator? List all the ‘C’ operators.

Answer:

Operator Definition:

AspectDescription
DefinitionSpecial symbols that perform operations on operands
PurposeManipulate data and variables

C Operators List:

CategoryOperators
Arithmetic+, -, *, /, %
Relational<, >, <=, >=, ==, !=
Logical&&, ||, !
Assignment=, +=, -=, *=, /=
Increment/Decrement++, –
Conditional?:

Mnemonic: “Add Relate Logic Assign Increment Condition” (ARLIC)


Question 2(b) [4 marks]
#

State difference between while and do while loop.

Answer:

Aspectwhile loopdo-while loop
Entry conditionPre-testedPost-tested
Minimum execution0 timesAt least 1 time
Syntaxwhile(condition) { }do { } while(condition);
SemicolonNot required after whileRequired after while

Example:

// while loop
while(i < 5) {
    printf("%d", i);
    i++;
}

// do-while loop  
do {
    printf("%d", i);
    i++;
} while(i < 5);

Key Points:

  • Pre-tested: Condition checked before execution
  • Post-tested: Condition checked after execution

Mnemonic: “While Before, Do After” (WB-DA)


Question 2(c) [7 marks]
#

How is scanf() function used for formatted input? Explain with example

Answer:

scanf() Function:

FeatureDescription
PurposeRead formatted input from keyboard
Syntaxscanf(“format_string”, &variable);
ReturnNumber of successfully read inputs

Format Specifiers:

SpecifierData Type
%dint
%ffloat
%cchar
%sstring

Examples:

int age;
float salary;
char grade;

scanf("%d", &age);           // Read integer
scanf("%f", &salary);        // Read float
scanf("%c", &grade);         // Read character
scanf("%d %f", &age, &salary); // Multiple inputs

Important Points:

  • Address operator (&): Required for variables
  • Format string: Must match data types
  • Buffer issues: Use fflush(stdin) if needed

Mnemonic: “Address Format Match” (AFM)


Question 2(a) OR [3 marks]
#

List arithmetic and relational operators of C language

Answer:

Operator TypeOperatorsPurpose
Arithmetic+, -, *, /, %Mathematical operations
Relational<, >, <=, >=, ==, !=Comparison operations

Examples:

// Arithmetic
int a = 10 + 5;    // Addition
int b = 10 % 3;    // Modulus (remainder)

// Relational
if(a > b)          // Greater than
if(a == b)         // Equal to

Mnemonic: “Add Multiply Compare” (AMC)


Question 2(b) OR [4 marks]
#

Draw flow chart of else if ladder.

Answer:

flowchart TD
    A[Start] --> B{Condition 1?}
    B -->|True| C[Statement 1]
    B -->|False| D{Condition 2?}
    D -->|True| E[Statement 2]
    D -->|False| F{Condition 3?}
    F -->|True| G[Statement 3]
    F -->|False| H[Else Statement]
    C --> I[End]
    E --> I
    G --> I
    H --> I

Structure:

  • Multiple conditions: Checked sequentially
  • First true: Corresponding block executes
  • Default case: Else block for no match

Mnemonic: “Check First True Execute” (CFTE)


Question 2(c) OR [7 marks]
#

How is printf() function used for formatted output? Explain with example

Answer:

printf() Function:

FeatureDescription
PurposeDisplay formatted output on screen
Syntaxprintf(“format_string”, variables);
ReturnNumber of characters printed

Format Specifiers:

SpecifierUsageExample
%dIntegerprintf("%d", 25);
%fFloatprintf("%.2f", 3.14);
%cCharacterprintf("%c", ‘A’);
%sStringprintf("%s", “Hello”);

Advanced Formatting:

int num = 123;
float pi = 3.14159;

printf("Number: %5d\n", num);      // Width specification
printf("Pi: %.2f\n", pi);          // Precision specification
printf("Hex: %x\n", num);          // Hexadecimal
printf("Left aligned: %-10d\n", num); // Left alignment

Escape Sequences:

  • \n: New line
  • \t: Tab space
  • \: Backslash

Mnemonic: “Format Width Precision Align” (FWPA)


Question 3(a) [3 marks]
#

List Logical operators and explain it

Answer:

OperatorSymbolDescriptionTruth Table
AND&&True if both operands trueT&&T = T, others = F
OR||True if any operand trueF||F = F, others = T
NOT!Inverts the condition!T = F, !F = T

Examples:

int a = 5, b = 10;

if(a > 0 && b > 0)    // Both conditions must be true
if(a > 15 || b > 5)   // At least one condition true  
if(!(a > 10))         // Negation of condition

Mnemonic: “And Or Not” (AON)


Question 3(b) [4 marks]
#

Explain for loop with example.

Answer:

For Loop Structure:

ComponentPurpose
InitializationSet starting value
ConditionTest for continuation
UpdateModify loop variable

Syntax:

for(initialization; condition; update) {
    statements;
}

Example:

// Print numbers 1 to 5
for(int i = 1; i <= 5; i++) {
    printf("%d ", i);
}
// Output: 1 2 3 4 5

Execution Flow:

  • Step 1: Initialize i = 1
  • Step 2: Check condition i <= 5
  • Step 3: Execute statements
  • Step 4: Update i++, repeat from step 2

Mnemonic: “Initialize Check Execute Update” (ICEU)


Question 3(c) [7 marks]
#

Write a program to find maximum out of three integer numbers x and y.

Answer:

#include <stdio.h>

int main() {
    int x, y, z, max;
    
    printf("Enter three numbers: ");
    scanf("%d %d %d", &x, &y, &z);
    
    max = x;  // Assume first number is maximum
    
    if(y > max) {
        max = y;
    }
    if(z > max) {
        max = z;
    }
    
    printf("Maximum number is: %d", max);
    
    return 0;
}

Algorithm Steps:

StepAction
1Input three numbers
2Assume first as maximum
3Compare with second, update if larger
4Compare with third, update if larger
5Display maximum

Alternative Method:

max = (x > y) ? ((x > z) ? x : z) : ((y > z) ? y : z);

Mnemonic: “Assume Compare Update Display” (ACUD)


Question 3(a) OR [3 marks]
#

Explain conditional operator with example.

Answer:

Conditional Operator (Ternary):

FeatureDescription
Symbol?:
Syntaxcondition ? value1 : value2
PurposeShortcut for if-else

Examples:

int a = 10, b = 20;
int max = (a > b) ? a : b;        // max = 20

char grade = (marks >= 60) ? 'P' : 'F';
printf("Status: %s", (age >= 18) ? "Adult" : "Minor");

Equivalent if-else:

if(a > b)
    max = a;
else
    max = b;

Advantages:

  • Concise: Single line expression
  • Efficient: Faster execution

Mnemonic: “Question Mark Colon Choice” (QMCC)


Question 3(b) OR [4 marks]
#

Explain while loop with example.

Answer:

While Loop:

FeatureDescription
TypeEntry-controlled loop
Syntaxwhile(condition) { statements; }
ExecutionRepeats while condition is true

Example:

int i = 1;
while(i <= 5) {
    printf("%d ", i);
    i++;
}
// Output: 1 2 3 4 5

Important Points:

  • Initialization: Before loop
  • Condition: Checked at beginning
  • Update: Inside loop body
  • Infinite loop: If condition never becomes false

Flowchart Structure:

flowchart TD
    A[Initialize] --> B{Condition?}
    B -->|True| C[Execute Statements]
    C --> D[Update Variable]
    D --> B
    B -->|False| E[Exit Loop]

Mnemonic: “Initialize Check Execute Update” (ICEU)


Question 3(c) OR [7 marks]
#

WAP to read an integer from key board and print whether given number is odd or even.

Answer:

#include <stdio.h>

int main() {
    int number;
    
    printf("Enter an integer: ");
    scanf("%d", &number);
    
    if(number % 2 == 0) {
        printf("%d is Even number", number);
    }
    else {
        printf("%d is Odd number", number);
    }
    
    return 0;
}

Logic Explanation:

ConceptDescription
Modulus operator (%)Returns remainder after division
Even conditionnumber % 2 == 0
Odd conditionnumber % 2 != 0

Alternative Methods:

// Method 2: Using conditional operator
printf("%d is %s", number, (number % 2 == 0) ? "Even" : "Odd");

// Method 3: Using bitwise AND
if(number & 1)
    printf("Odd");
else
    printf("Even");

Sample Output:

Enter an integer: 7
7 is Odd number

Mnemonic: “Modulus Two Zero Even” (MTZE)


Question 4(a) [3 marks]
#

Evaluate following arithmetic expressions: 30/4*4 – 20%6 + 17/2

Answer:

Step-by-step Evaluation:

StepExpressionCalculationResult
130/4*4(30/4)4 = 7428
220%620 mod 62
317/2Integer division8
4Final28 - 2 + 834

Operator Precedence:

PriorityOperators
High*, /, % (Left to right)
Low+, - (Left to right)

Complete Calculation:

30/4*4 – 20%6 + 17/2
= 7*4 - 2 + 8      // Division and modulus first
= 28 - 2 + 8       // Multiplication
= 26 + 8           // Left to right for +,-
= 34               // Final answer

Mnemonic: “Multiply Divide Before Add Subtract” (MDBAS)


Question 4(b) [4 marks]
#

WAP to find sum and average of an array of 5 integer numbers.

Answer:

#include <stdio.h>

int main() {
    int numbers[5];
    int sum = 0;
    float average;
    
    printf("Enter 5 integers:\n");
    for(int i = 0; i < 5; i++) {
        scanf("%d", &numbers[i]);
        sum += numbers[i];
    }
    
    average = (float)sum / 5;
    
    printf("Sum = %d\n", sum);
    printf("Average = %.2f", average);
    
    return 0;
}

Algorithm:

StepAction
1Declare array of 5 integers
2Initialize sum to 0
3Input 5 numbers using loop
4Add each number to sum
5Calculate average = sum/5
6Display results

Key Points:

  • Type casting: (float)sum for accurate division
  • Loop usage: Efficient for repetitive input

Mnemonic: “Declare Input Add Calculate Display” (DIACD)


Question 4(c) [7 marks]
#

Define pointer. Explain how pointers are declared and initialized with example.

Answer:

Pointer Definition:

AspectDescription
DefinitionVariable that stores memory address of another variable
PurposeDirect memory access and dynamic memory allocation
Symbol* (asterisk) for declaration and dereferencing

Declaration and Initialization:

// Declaration
int *ptr;           // Pointer to integer
float *fptr;        // Pointer to float
char *cptr;         // Pointer to character

// Initialization
int num = 10;
int *ptr = &num;    // Initialize with address of num

// Alternative
int *ptr;
ptr = &num;         // Assign address later

Example Program:

#include <stdio.h>

int main() {
    int num = 25;
    int *ptr = &num;
    
    printf("Value of num: %d\n", num);
    printf("Address of num: %p\n", &num);
    printf("Value of ptr: %p\n", ptr);
    printf("Value pointed by ptr: %d\n", *ptr);
    
    return 0;
}

Key Operators:

  • & (Address-of): Gets address of variable
  • * (Dereference): Gets value at address

Memory Diagram:

num: [25] at address 1000
ptr: [1000] at address 2000

Mnemonic: “Address Star Dereference” (ASD)


Question 4(a) OR [3 marks]
#

Evaluate following arithmetic expressions: 50 / 3 % 3 + 5 * 7

Answer:

Step-by-step Evaluation:

StepExpressionCalculationResult
150/3Integer division16
216%316 mod 31
35*7Multiplication35
4Final1 + 3536

Complete Calculation:

50 / 3 % 3 + 5 * 7
= 16 % 3 + 35      // Division and multiplication first
= 1 + 35           // Modulus operation
= 36               // Final answer

Operator Precedence Applied:

  • High priority: /, %, * (left to right)
  • Low priority: + (left to right)

Mnemonic: “Divide Mod Multiply Add” (DMMA)


Question 4(b) OR [4 marks]
#

WAP to find the largest number in an array of N integers.

Answer:

#include <stdio.h>

int main() {
    int n, i;
    int largest;
    
    printf("Enter number of elements: ");
    scanf("%d", &n);
    
    int arr[n];
    
    printf("Enter %d numbers:\n", n);
    for(i = 0; i < n; i++) {
        scanf("%d", &arr[i]);
    }
    
    largest = arr[0];  // Assume first element is largest
    
    for(i = 1; i < n; i++) {
        if(arr[i] > largest) {
            largest = arr[i];
        }
    }
    
    printf("Largest number is: %d", largest);
    
    return 0;
}

Algorithm:

StepAction
1Input array size
2Input array elements
3Assume first element as largest
4Compare with remaining elements
5Update largest if bigger found
6Display result

Mnemonic: “Input Assume Compare Update Display” (IACUD)


Question 4(c) OR [7 marks]
#

Define array. Explain the need for array variable. Explain 1-D array with example

Answer:

Array Definition:

AspectDescription
DefinitionCollection of similar data type elements
StorageConsecutive memory locations
AccessUsing index/subscript

Need for Arrays:

ProblemSolution with Array
Store multiple valuesSingle array variable
Avoid multiple variablesarr[100] instead of a1, a2, …, a100
Efficient processingLoop-based operations
Memory organizationContiguous allocation

1-D Array Declaration:

datatype arrayname[size];

// Examples
int marks[5];           // Array of 5 integers
float prices[10];       // Array of 10 floats
char name[20];         // Array of 20 characters

Array Initialization:

// Method 1: At declaration
int numbers[5] = {10, 20, 30, 40, 50};

// Method 2: Individual assignment
int arr[3];
arr[0] = 5;
arr[1] = 15;
arr[2] = 25;

Example Program:

#include <stdio.h>

int main() {
    int marks[5] = {85, 90, 78, 92, 88};
    int i, sum = 0;
    
    printf("Student marks:\n");
    for(i = 0; i < 5; i++) {
        printf("Subject %d: %d\n", i+1, marks[i]);
        sum += marks[i];
    }
    
    printf("Total marks: %d", sum);
    return 0;
}

Memory Layout:

marks[0] marks[1] marks[2] marks[3] marks[4]
  [85]     [90]     [78]     [92]     [88]
 1000     1004     1008     1012     1016

Mnemonic: “Similar Data Consecutive Index” (SDCI)


Question 5(a) [3 marks]
#

Give an example of if … else statement.

Answer:

If-else Example:

#include <stdio.h>

int main() {
    int age;
    
    printf("Enter your age: ");
    scanf("%d", &age);
    
    if(age >= 18) {
        printf("You are eligible to vote");
    }
    else {
        printf("You are not eligible to vote");
    }
    
    return 0;
}

Structure:

ComponentPurpose
ifTests condition
conditionBoolean expression
if-blockExecutes when condition true
else-blockExecutes when condition false

Sample Outputs:

Input: 20    Output: You are eligible to vote
Input: 16    Output: You are not eligible to vote

Mnemonic: “If True Else False” (ITEF)


Question 5(b) [4 marks]
#

WAP to check the category of given character.

Answer:

#include <stdio.h>
#include <ctype.h>

int main() {
    char ch;
    
    printf("Enter a character: ");
    scanf("%c", &ch);
    
    if(isdigit(ch)) {
        printf("'%c' is a Digit", ch);
    }
    else if(isupper(ch)) {
        printf("'%c' is an Uppercase letter", ch);
    }
    else if(islower(ch)) {
        printf("'%c' is a Lowercase letter", ch);
    }
    else {
        printf("'%c' is a Special symbol", ch);
    }
    
    return 0;
}

Character Categories:

FunctionCategoryRange
isdigit()Digit0-9
isupper()UppercaseA-Z
islower()Lowercasea-z
OthersSpecial symbols!@#$%^&* etc.

Alternative Method:

if(ch >= '0' && ch <= '9')
    printf("Digit");
else if(ch >= 'A' && ch <= 'Z')
    printf("Uppercase");
else if(ch >= 'a' && ch <= 'z')
    printf("Lowercase");
else
    printf("Special symbol");

Mnemonic: “Digit Upper Lower Special” (DULS)


Question 5(c) [7 marks]
#

What is structure? Explain its syntax with suitable example

Answer:

Structure Definition:

AspectDescription
DefinitionUser-defined data type combining different data types
PurposeGroup related data under single name
Keywordstruct

Syntax:

struct structure_name {
    datatype member1;
    datatype member2;
    ...
};

Example - Student Structure:

#include <stdio.h>

struct Student {
    int roll_no;
    char name[50];
    float marks;
    char grade;
};

int main() {
    struct Student s1;
    
    // Input data
    printf("Enter roll number: ");
    scanf("%d", &s1.roll_no);
    
    printf("Enter name: ");
    scanf("%s", s1.name);
    
    printf("Enter marks: ");
    scanf("%f", &s1.marks);
    
    printf("Enter grade: ");
    scanf(" %c", &s1.grade);
    
    // Display data
    printf("\nStudent Details:\n");
    printf("Roll No: %d\n", s1.roll_no);
    printf("Name: %s\n", s1.name);
    printf("Marks: %.2f\n", s1.marks);
    printf("Grade: %c\n", s1.grade);
    
    return 0;
}

Structure Features:

FeatureDescription
Dot operator (.)Access structure members
Memory allocationTotal size = sum of all members
InitializationCan initialize at declaration

Structure Initialization:

struct Student s1 = {101, "John", 85.5, 'A'};

Memory Layout:

s1: [roll_no][name...][marks][grade]
     4 bytes  50 bytes 4 bytes 1 byte

Mnemonic: “Group Related Data Together” (GRDT)


Question 5(a) OR [3 marks]
#

WAP to Print all numbers between -5 & +5.

Answer:

#include <stdio.h>

int main() {
    int i;
    
    printf("Numbers between -5 and +5:\n");
    
    for(i = -5; i <= 5; i++) {
        printf("%d ", i);
    }
    
    return 0;
}

Output:

Numbers between -5 and +5:
-5 -4 -3 -2 -1 0 1 2 3 4 5

Alternative Methods:

// Method 2: Using while loop
int i = -5;
while(i <= 5) {
    printf("%d ", i);
    i++;
}

// Method 3: Two separate loops
for(i = -5; i < 0; i++)
    printf("%d ", i);
printf("0 ");
for(i = 1; i <= 5; i++)
    printf("%d ", i);

Mnemonic: “Start Negative End Positive” (SNEP)


Question 5(b) OR [4 marks]
#

WAP to find roots of quadratic equation.

Answer:

#include <stdio.h>
#include <math.h>

int main() {
    float a, b, c;
    float discriminant, root1, root2;
    
    printf("Enter coefficients (a, b, c): ");
    scanf("%f %f %f", &a, &b, &c);
    
    discriminant = b*b - 4*a*c;
    
    if(discriminant > 0) {
        root1 = (-b + sqrt(discriminant)) / (2*a);
        root2 = (-b - sqrt(discriminant)) / (2*a);
        printf("Roots are real and different\n");
        printf("Root1 = %.2f\n", root1);
        printf("Root2 = %.2f\n", root2);
    }
    else if(discriminant == 0) {
        root1 = -b / (2*a);
        printf("Roots are real and equal\n");
        printf("Root = %.2f\n", root1);
    }
    else {
        float realPart = -b / (2*a);
        float imagPart = sqrt(-discriminant) / (2*a);
        printf("Roots are complex\n");
        printf("Root1 = %.2f + %.2fi\n", realPart, imagPart);
        printf("Root2 = %.2f - %.2fi\n", realPart, imagPart);
    }
    
    return 0;
}

Quadratic Formula Analysis:

DiscriminantNature of Roots
b²-4ac > 0Real and different
b²-4ac = 0Real and equal
b²-4ac < 0Complex (imaginary)

Formula: x = (-b ± √(b²-4ac)) / 2a

Sample Output:

Enter coefficients: 1 -7 12
Roots are real and different
Root1 = 4.00
Root2 = 3.00

Mnemonic: “Discriminant Decides Root Nature” (DDRN)


Question 5(c) OR [7 marks]
#

Explain following built-in functions with examples

Answer:

Function Explanations:

FunctionPurposeHeader FileExample
clrscr()Clear screenconio.hclrscr();
sqrt()Square rootmath.hsqrt(16) = 4.0
strlen()String lengthstring.hstrlen(“Hello”) = 5
isdigit()Check if digitctype.hisdigit(‘5’) = true
isalpha()Check if alphabetctype.hisalpha(‘A’) = true
toupper()Convert to uppercasectype.htoupper(‘a’) = ‘A’
tolower()Convert to lowercasectype.htolower(‘B’) = ‘b’

Example Program:

#include <stdio.h>
#include <conio.h>
#include <math.h>
#include <string.h>
#include <ctype.h>

int main() {
    clrscr();  // Clear screen
    
    // sqrt() example
    float num = 25.0;
    printf("Square root of %.1f = %.2f\n", num, sqrt(num));
    
    // strlen() example
    char str[] = "Programming";
    printf("Length of '%s' = %d\n", str, strlen(str));
    
    // Character functions
    char ch = 'a';
    printf("'%c' is digit: %s\n", ch, isdigit(ch) ? "Yes" : "No");
    printf("'%c' is alphabet: %s\n", ch, isalpha(ch) ? "Yes" : "No");
    printf("Uppercase of '%c' = '%c'\n", ch, toupper(ch));
    
    ch = 'B';
    printf("Lowercase of '%c' = '%c'\n", ch, tolower(ch));
    
    return 0;
}

Function Categories:

graph TD
    A[Built-in Functions] --> B[Screen Control]
    A --> C[Mathematical]
    A --> D[String]
    A --> E[Character]
    
    B --> F[clrscr()]
    C --> G[sqrt()]
    D --> H[strlen()]
    E --> I[isdigit(), isalpha()]
    E --> J[toupper(), tolower()]

Key Points:

  • Header files: Must include appropriate headers
  • Return values: Most functions return specific types
  • Parameter types: Check function parameter requirements

Mnemonic: “Clear Math String Character” (CMSC)

Related

Mobile & Wireless Communication (4351104) - Summer 2025 Solution
22 mins
Study-Material Solutions Mobile-Communication 4351104 2025 Summer
VLSI Technology (4353206) - Summer 2025 Solution
21 mins
Study-Material Solutions Vlsi-Technology 4353206 2025 Summer
Computer Networking (4343202) - Summer 2025 Solution
14 mins
Study-Material Solutions Networking 4343202 2025 Summer
Database Management System (1333204) - Summer 2025 Solution
17 mins
Study-Material Solutions Database 1333204 2025 Summer
Linear Integrated Circuit (4341105) - Summer 2025 Solution
16 mins
Study-Material Solutions Linear-Integrated-Circuit 4341105 2025 Summer
Principles of Electronic Communication (4331104) - Summer 2025 Complete Solution
19 mins
Study-Material Solutions Electronic-Communication 4331104 2025 Summer