coderz.py

Keep Coding Keep Cheering!

Miscellaneous Program(exponential without using pow() method)

Without using the pow() method, here is a program to find exponential. Long long int is twice as big as long int. The format specifier for long long int is % lld. Output: input is 2 and 3. input is 12. Note: also read about the Miscellaneous Program(Armstrong Number) Follow Me If you like my post please […]

April 8, 2022 | C | No comments

Miscellaneous Program(Armstrong Number)

An Armstrong number is an n-digit number whose sum of digits raised to the nth power equals the number itself. Take, for example, the Armstrong number 153, which is a three-digit number; 1^3 + 5^3 + 3^3 equals 1 + 125 + 27, which equals 153. A program to find Armstrong numbers between 1 and 500 […]

April 8, 2022 | C | No comments

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

Advertisement