Category: C Programming

C Programming
uncategorised

Dynamic string manipulation and memory allocation in C.

I need help writing a C program that reads a line of text from the user of an unknown length, dynamically allocates memory for it using malloc or realloc, reverses the string in place, and prints the result. The program must handle memory management properly, ensuring there are no memory leaks, and should free all […]

Read More
C Programming
uncategorised

Write a C Program to find a even numbers which hidden in 2 t…

Write a C Program to find a even numbers which hidden in 2 to 10 tables

Read More
C Programming
uncategorised

Write a C program to reverse a string using pointers without…

Problem Description: Write a C program to reverse a string using pointers. The program should take a string input from the user and display both the original and reversed string. Technical Requirements: – Programming Language: C – Language Standard: C99 or later – Compiler: GCC (GNU Compiler Collection) – IDE: Code::Blocks / VS Code / […]

Read More
C Programming
uncategorised

Correct program

REM to add record in an existing file CLS Open ”Record.Dat” FOR OUTPUT AS #1 AA: c4 B3 44 Input “Enter Name, Class and Roll No. “; Nm$, CI, Rn. Input #2, Nm$, CI, Rn. Input “More records”; Y$. IF UCASE$(Y$)=”y” THEN GOTO aa CLOSE “Record.dat”. END

Read More
C Programming

If statement: The condition evaluates to either true or false. True is always a

If statement: The condition evaluates to either true or false. True is always a If statement: The condition evaluates to either true or false. True is always a non-zero value, and false is a value that contains zero. Instructions can be a single instruction or a code block enclosed by curly braces { }. Program […]

Read More
C Programming

expression containing logical operator returns either 0 or 1 depending upon whet

expression containing logical operator returns either 0 or 1 depending upon whet expression containing logical operator returns either 0 or 1 depending upon whether expression results true or false. Logical operators are commonly used in decision making in C programming. Program: #include #include void main() { int a = 5, b = 5, c = […]

Read More
C Programming

List and explain the operators in C programming with example. Program : #include

List and explain the operators in C programming with example. Program : #include List and explain the operators in C programming with example. Program : #include #include void main() { int a = 9,b = 4; clrscr(); printf(“a+b = %d n”,a+b); printf(“a-b = %d n”, a-b); printf(“a*b = %d n”, a*b); printf(“a/b = %d n”, […]

Read More
C Programming

An assignment operator is used for assigning a value to a variable. The most com

An assignment operator is used for assigning a value to a variable. The most com An assignment operator is used for assigning a value to a variable. The most common assignment operator is =. Program : #include #include void main() { int a = 5, c; clrscr(); c = a; // c is 5 printf(“c […]

Read More
C Programming

A relational operator checks the relationship between two operands. If the relat

A relational operator checks the relationship between two operands. If the relat A relational operator checks the relationship between two operands. If the relation is true, it returns 1; if the relation is false, it returns value 0. The following table shows all relation operators supported by C. Program: #include #include void main() { int […]

Read More
C Programming

#include int main() { int n, reversed = 0, remainder, original; p

#include int main() { int n, reversed = 0, remainder, original; p #include int main() { int n, reversed = 0, remainder, original; printf(“Enter an integer: “); scanf(“%d”, &n); original = n; // reversed integer is stored in reversed variable while (n != 0) { remainder = n % 10; reversed = reversed * 10 […]

Read More