Skip to main content

Posts

Showing posts with the label String in C

What is "String in C Language" and "String handling function"

What is String in C Language  and String handling function   We are going on new topic of C language of String. If you are not read our previous topic. Then you can visit them and read it, for better understand. So, today we are talking about string , string handling functions and its types and declaring and initializing a string. Char Datatype In C Language Char Datatype In C Language Whenever a variable of char type is created, It is allocated one byte of space in the memory. The Character assigned to a variable of type char, is assigned in single count. syntax: char variable name; To work on character data, We use percentage 'c' (%c) type specifier. Whenever a user enters a data in a variable of type char. The user specifier the data without single count. Sample code:- //program using char data type #include<conio.h> #include<stdio.h> void main() { char data; clrscr(); printf("Enter a Character"); scanf("%c",&data); pr...