Posts

Programming in C GXEST204 - KTU 2024 scheme syllabus notes pdf ------- Dr Binu V P

About me About the course- Scheme and Evaluation GXEST204 Syllabus GXEST204 Model Question Paper GXEST204 Programming in C - KTU 2024 Scheme University Question Paper and Answer  Scheme GXEST204 Programming in C-May 2025  - KTU 2024 Scheme University Question Paper  and  Answer  Scheme  GXEST204 Programming in C-Dec 2025  - KTU 2024 Scheme Introduction to C Programming Beginning with C Programming Programming in C using gcc in Linux Debugging C Program using gdb Module-1 C Fundamentals Structure of a C Program Variables and constants in C Escape Sequences Keywords and Identifiers Data Types and qualifiers   Data Type summary Primitive and Derived Data Type Preprocessor Directive Header Files in C Input-output printf() and scanf() Operators, precedence and expressions Bitwise operators in C Simple Programs to Begin with Control Statements Control statements in C if-else statement , sample programs, programs to try switch case statement, ...

University Question Paper and Answer Scheme GXEST204 Programming in C - KTU 2024 Scheme

 

Programming in C GXEST204 - KTU 2024 Scheme Syllabus

Image
 

About the course GXEST 204 - scheme and assesments

Image
 

Debugging C Program using gdb

Debugging a C Program Using GDB Step 1: Compile the C Program with Debugging Option -g Compile your C program using the -g option. This allows the compiler to include debugging information. Example: $ cc -g test.c ( test.c is the sample program to debug) Step 2: Launch GDB Start the C debugger ( gdb ) as shown below: $ gdb a. out Step 3: Set Up a Breakpoint Inside the C Program Syntax: break [file_name]:line_number Example: break test.c: 3 This sets a breakpoint at line number 3 . Breakpoints are placed where you suspect errors. During execution, the debugger stops at the breakpoint and allows you to debug. Step 4: Execute the C Program in GDB Run the program using: run [args] ( args are optional command-line arguments) Step 5: Print Variable Values Inside GDB Syntax: print {variable} Example: print i Step 6: Continue, Step Over, and Step Into When the program stops at a breakpoint, you can: Continue Execution c or continue Runs until t...

Programming in C using gcc in Linux

Image
Installing GCC and Writing Your First C Program 1️⃣ Check Whether GCC Is Installed If you are using Linux or UNIX, check if GCC is installed: $ gcc -v If GCC is installed, version details will be displayed. If not installed, install it using instructions from: https://gcc.gnu.org/install/ 2️⃣ Install GCC on Ubuntu Method 1: Install GCC Directly Open terminal and run: $ sudo apt-get install gcc (Example: Ubuntu 18.04 Bionic Beaver / 20.04 Focal Fossa) Method 2: Install Using build-essential (Recommended) This installs: gcc compiler g++ compiler required libraries $ sudo apt -get install build-essential 3️⃣ Check GCC Version After Installation $ gcc --version 4️⃣ Writing Your First C Program Example Program /* my first program */ # include <stdio.h> int main ( void ) { printf ( "Hello World" ); return 0 ; } Output Hello World 5️⃣ Program Explanation (Line by Line) Line 0 /* my first program */ Multi-line comments in C are written between /* */ Comm...

Beginning with C Programming

Beginning with C Programming 1️⃣ Finding a Compiler Before starting C programming, you need a compiler to compile and run programs. ✔ Online C Compilers (No Installation Needed) You can use: http://ideone.com/ https://www.onlinegdb.com/online_c_compiler These allow you to write and run C programs directly in the browser. 2️⃣ Compilers for Different Operating Systems 🪟 Windows Free C compilers available: Code::Blocks Dev-C++ Borland C https://developerinsider.co/download-and-install-borland-c-compiler-on-windows-10/ Turbo C https://developerinsider.co/download-turbo-c-for-windows-7-8-8-1-and-windows-10-32-64-bit-full-screen/ 🐧 Linux GCC usually comes bundled with Linux Code::Blocks can also be used This guide is based on Linux (Ubuntu) and examples are compiled on Ubuntu. 3️⃣ Check if GCC is Installed (Linux/UNIX) Open terminal and type: $ gcc -v If GCC is installed → version information will be displayed If not installed → follow instructions: https://gcc.gnu.org/install/ 4️⃣ Wri...