coderz.py

Keep Coding Keep Cheering!

Miscellaneous Program(reverse the case of input string)

A program to reverse the case of input characters is provided below. islower() is a system-defined function in the ctype.h header file that determines whether a character is in lowercase. toupper() converts an input parameter to an uppercase equivalent. Output: Here, we can clearly see that the cases of all the characters in the input […]

April 8, 2022 | C | No comments

Miscellaneous Program(Palindrome Number)

A palindrome is a sequence that, when reversed, looks exactly like the original. For example, abba, level, 232, and so on. Let’s look at a program that uses the recursive technique to determine whether a number is a palindrome or not. Output: When the input is 121. When the input is 243. Note: also read […]

April 8, 2022 | C | No comments

Command Line Argument

When your C programs are run, you can pass some values from the command line to them. These values are known as command-line arguments, and they are frequently useful for your program, particularly when you want to control it from the outside rather than hard-coding those values into the code. The command-line arguments are handled […]

April 7, 2022 | C | No comments

Dynamic Memory Allocation

In the C programming language, the concept of dynamic memory allocation allows the programmer to allocate memory at runtime. Four functions in the stdlib.h header file allows for dynamic memory allocation in the C language. malloc() calloc() realloc() free() Function Description malloc() Allocates a single block of memory in response to a request. calloc() Allocates […]

April 5, 2022 | C | No comments

Error Handling in C

The response and recovery procedures from error conditions present in a software application are referred to as error handling. C programming does not provide direct error handling support, but as a system programming language, it does provide access at a lower level in the form of return values. In the event of an error, most […]

April 4, 2022 | C | No comments

File handling in C

File handling in C allows us to use our C program to create, update, read, and delete files stored on the local file system. A file can be subjected to the following operations: Making a new file Choosing an existing file to open Taking a page from the file Adding to the file removing the […]

April 3, 2022 | C | No comments

Pointers with function in c

We can create a pointer pointing to a function in the same way that we can create a pointer of any data type, such as int , char, or float. A function’s code is always stored in memory, which implies that the function has an address. We use the function pointer to get the memory […]

April 2, 2022 | C | No comments

Pointer operations

Just like any other data type, we can perform various arithmetic operations on pointers. All pointers int, float, long, and double are 2 bytes on a 16-bit machine. When we perform any arithmetic function, such as increment on a pointer, the size of their primitive data type changes. Remember the following data type storage sizes […]

April 2, 2022 | C | No comments

Pointer to Pointer in C

A pointer variable stores the address of another pointer variable; this is referred to as a pointer to a pointer variable in C. It is a type of multiple indirections, also known as a chain of pointers. A pointer contains the address of a variable, and when a pointer to a pointer is defined, the […]

March 31, 2022 | C | No comments

Pointer to structure

The structure pointer points to the memory block address where the Structure is stored. It’s used to make complex data structures like linked lists, trees, and graphs. The structure’s members can be accessed using an arrow operator (->). we can declare a struct pointer in the following manner: here, *p represents the pointer. Accessing is […]

March 28, 2022 | C | No comments

Advertisement