Join Regular Classroom : Visit ClassroomTech

Programming in C

C standard library function – malloc()

In case of static memory allocation there are some drawbacks like: wastage of memory, less flexibility, permanent allocation of variables etc. To overcome these situations the concept of Dynamic Memory Allocation has been introduced. In dynamic memory allocation the memories can be allocated dynamically at run time. There 4 library functions that are described under <stdlib.h>

C standard library function – malloc() Read More »

What is %p in C?

%p is a format specifier in C programming language. It is used to print the pointer type data. It prints the memory address of the variable pointed by the pointer in hexadecimal form. In 64 bit systems the pointers are of 8 bytes. So, the full hexadecimal representation is: 0000000000000055. Let’s take an example Example

What is %p in C? Read More »

Reverse a String in C

What is String?The string is a character array that ends with a null character denoted by ‘\0’. Now, in this program, we have to reverse a string in c programming.Suppose the Input is: codewindowThen the Output will be: wodniwedoc We have definitely different approaches to code this program. Using in-built function strrev() Without using in-built

Reverse a String in C Read More »