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 GXEST204 Programming in C - 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, examples, programs to try looping statements, examples, programs to try. Program transfer control statements. Nesting of loops, examples, programs to try. Infinite Loops Mo...

University Question Paper 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  C Program using gdb Step 1. Compile the C program with debugging option -g Compile your C program with -g option. This allows the compiler to collect the debugging information. Eg:         $cc -g test.c  //test.c is the sample program to debug Step 2. Launch gdb Launch the C debugger (gdb) as shown below.     $gdb a.out Step 3. Set up a break point inside C program Syntax:     break [file_name]:line_number Eg:         break test.c:3 // this will set a break point at line number3 Places break point in the C program, where you suspect errors. While executing the program, the debugger will stop at the break point, and gives you the prompt to debug. Step 4. Execute the C program in gdb debugger You can start running the program using the run command in the gdb debugger.   Eg: run [args]  // args are optional Step 5. Printing the variable values inside gdb debugger Sy...

Programming in C using gcc in Linux

Image
If you are using Linux or UNIX, then check whether GCC is installed on your system by entering the following command from the command line − $ gcc -v If you have GNU compiler installed on your machine, then it should print a message.If GCC is not installed, then you will have to install it yourself using the detailed instructions available at https://gcc.gnu.org/install/ Install GCC The following linux command will install gcc compiler on Ubuntu 18.04 Bionic Beaver( Latest version is 20.04 Focal Fossa) .Open up terminal and enter:  $sudo apt-get install gcc Install build-essential Another way to install gcc compiler is to install it as part of build-essential package. build-essential package will also install additional libraries as well as g++ compiler. In most cases or if unsure this is exactly what you need: $sudo apt-get install build-essential Check GCC version Confirm your installation by checking for GCC version: $ gcc --version Writing first program: Following is first prog...

Beginning with C Programming

Beginning with C programming Finding a Compiler: Before we start C programming, we need to have a compiler to compile and run our programs. There are certain online compilers like  http://ideone.com/  or  https://www.onlinegdb.com/online_c_compiler that can be used to start C programming without installing a compiler. Windows: There are many compilers available freely for compilation of C programs like  Code Blocks  and  Dev-CPP. 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/ ) etc Linux: For Linux, gcc comes bundled with the linux, Code Blocks can also be used with Linux. This Blog has been written based on Linux and all the given examples have been compiled on the Ubuntu flavor of the Linux system.If you are using Linux or UNIX, then check whether GCC is installed on your system by entering the ...