A Matrix Multiplication program is provided below. Only when the number of columns in the first matrix equals the number of rows in the second matrix can two matrices with the same order be multiplied. Output: Note: also read about the Miscellaneous Program(Remove Duplicate Elements) Follow Me If you like my post please follow me to read […]
April 10, 2022 | C | No comments
When an array contains the same number of elements in both sorted and unsorted order, the elements of the array are referred to as duplicate elements. And we must remove duplicate elements or elements with the same number from an array in order for the resultant array to contain only unique elements. There is an […]
April 10, 2022 | C | No comments
A simple program to reverse an array is provided below. Output: here, we have reversed the input array and printed it. Note: also read about the Miscellaneous Program(exponential without using pow() method) Follow Me If you like my post please follow me to read my latest post on programming and technology. https://www.instagram.com/coderz.py/ https://www.facebook.com/coderz.py Rabecca FatimaStaying up to […]
April 9, 2022 | C | No comments
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
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
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
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
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
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
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