Notification texts go here Contact Us Buy Now!

C Pragramme code can be used to read/print a character

C Pragramme code can be used to read/print a character

C Pragramme code can be used to read/print a character.

To Print Character In C Program First Declare A Variable And Data Type Should Be Char.

example

#include<stdio.h>
#include<conio.h>
void main()
{
   char character;   //* Data Type Is Char *//

   clrscr();

   printf(" Enter One Character To Print \n ");

    //* Code Line For Getting Input Data *//

   scanf("%c",&character);     

   //* Code Line For Getting Input Data *//

   printf("\n You Entered Character Is = %c \n",character);   //* Format Scpecifier Is %c *//  


   printf("\n \n To Print Character In C Programm Create Variable With Data Type Char ,\n and to get value in scanf function you need to use %c format specifier",'%');



   getch();


}



OUTPUT




Post a Comment

Cookie Consent
We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.
Oops!
It seems there is something wrong with your internet connection. Please connect to the internet and start browsing again.
AdBlock Detected!
We have detected that you are using adblocking plugin in your browser.
The revenue we earn by the advertisements is used to manage this website, we request you to whitelist our website in your adblocking plugin.
Site is Blocked
Sorry! This site is not available in your country.