Category Archives: C

HEADER FILE “process.h”

process.h process.h is a C header file which contains function declarations and macros used in working with threads and processes. Most C compilers that target DOS, Windows 3.1x, Win32, OS/2, Novell NetWare or DOS extenders supply this header and the … Continue reading

Posted in C, COMPUTING | Leave a comment

Winsock tutorial – Socket programming in C on windows using CODE::BLOCKS

I DID THE PROGRAMMING IN CODE::BLOCKS BY THE AUTHOR OF THIS BLOG!! RIGHT CLICK YOUR PROJECT AND CLICK “BUILD OPTIONS” ADD THE LIBRARY! THEN BUILD BY PRESSING CTRL+F9 THEN SUCCESSFULL!!! ENJOY CODING!!! Initialising Winsock Winsock first needs to be initialiased … Continue reading

Posted in C, CODE::BLOCKS | Tagged , , | Leave a comment

C PROGRAMMING % FORMAT SPECIFIERS (e.g. printf) OR PRINT FORMAT STRING ON C

SPECIFIER SYNTAX:  %[flag][field_width][.[precision]][l]conversion_char u        -Display an unsigned integer in decimal notation. o        -Display an integer in unsigned octal notation. x, X   -Display an integer in unsigned hexadecimal notation. Use x for lowercase output … Continue reading

Posted in C | Leave a comment

TYPES OF VARIABLE IN C or NUMERIC DATA TYPES IN C PROGRAMMING

Variable Type Keyword Bytes Required Range Character char 1 -128 to 127 Integer int 2 -32768 to 32767 Short integer short 2 -32768 to 32767 Long integer long 4 -2,147,483,648 to 2,147,438,647 Unsigned character unsigned char 1 0 to 255 … Continue reading

Posted in C | Leave a comment

STRUCTURE IN C PROGRAMMING and USING TYPEDEF IN STRUCTURE and LINK LIST EXAMPLE

NEED TO REMEMBER & = address-of operator * = indirection operator / pointer c program and multiplication in math function -> = indirect membership operator   The struct Keyword FORMAT: struct tag { structure_member(s); /* additional statements may go here */ } instance; … Continue reading

Posted in C | Leave a comment

USING *POINTER TO A FUNCTION IN C PROGRAMMING WITH TYPEDEF

USING POINTER TO A FUNCTION IN C PROGRAMMING WITH TYPEDEF First of all you have to know about how to declare pointer to a function. /*Declaring a Pointer to a Function Rules*/ Prototype: type (*ptr_to_func)(parameter_list); Example: void (*func1)(); char (*func2)(char … Continue reading

Posted in C | Leave a comment

In C, using a pointer to a struct to call a function

In C, using a pointer to a struct to call a function pointed to inside the struct leads to seg fault This causes a seg fault: SOLUTION:

Posted in C | Leave a comment