Skip to main content

Posts

Showing posts from January, 2020

int main inside int main()

Hello Everyone!!! In this module, we are going to try one experiment with Recursion. Intro Do you know what happens when we call the main inside main()?? If yes, you are welcome & if no, we are going to try the main inside main() experiment now. Let's Go!!! Code Here, I have used pointer of main & assigned an integer of 7 to it. Finally printed the main. Let's see the output. Output Here we go!! It prints the integer value stored at the address of the "main" pointer. Outro If you like this experiment with recursion, share with your friends & leave your valuable suggestions and reviews below. Thank You!!!

How To Convert Integer Into ASCII Value Using C Program ?

Hi Everyone!!! At the end of this module, you will be able to get ASCII value from Integer using a C program. Intro There are many hidden tricks in C that are very useful and simple to use. Now, we are going to code a C program that converts an integer into ASCII value. Let's Go. Logic Declare a character variable Store character value to that variable from the user ("%c") Print the ASCII value ("%d") Program Output Trick Here is a trick. When we convert a character value into an integer by using ("%s" to "%d"), GNU Compiler prints the ASCII value assigned to that character. This conversion is known as Type-Casting in programming. Outro If you like it, please share it with your friends and leave your comments below. Thank You!!!