NULL Character >> Terminating Character in String >> C programming

NULL Character >> Terminating Character in String >> C programming Why do we need Terminating Character ? String is not data type in C String is necessary Data Structure in C Programming String is nothing but Variable length Structure stored in Fixed Length Structure Array Size is not the Actual Length of the String ,(…)

Reading String with spaces by using scanf

Reading String with spaces by using scanf Note that - scanf with %s accepts only String which does not contain whitespaces (blanks/space) C Supports the ‘ special Edit set Conversion Code ‘ , by using this method we can accept the line of String with spaces using scanf It Reads wide verity of Characters including(…)

Arithmetic Operations On Character in C Programming

Arithmetic Operations On Character : C Programming Allows you to Manipulate on String Whenever the Character is variable is used in the expression then it is automatically Converted into Integer Value called ASCII value All Characters can be Manipulated with that Integer Value.(Addition,Subtraction) Examples : ASCII value of : ‘a’ is 97 ASCII value of(…)

Common Errors in C : Part 1

Common Errors in C :. Pre Processor Directives Error / Mistake 1 : Semicolon at the end of #define Example : #define MAX 100; Error / Mistake 2 : Typing Incorrect Spelling of the ‘include’ / Header file Example : stdio.h includ

Header File >> Conio.h >> Functions in C Programming Language

Header File >> Conio.h >> Functions in C Programming Language cgets clreol clrscr cprintf cputs cscanf delline getch getche getpass gettext gettextinfo gotoxy highvideo insline inp inport inportb inpw kbhit lowvideo movetext normvideo outp outport outportb outpw putch puttext _setcursortype textattr textbackground textcolor textmode ungetch wherex wherey window

Putchar function >> Displaying String in C

Putchar function : Displaying String in C Programming Syntax : int putchar(int c); Way 1 : Taking Character as Parameter putchar(‘a’) ; // Displays : a Individual Character is Given as parameter to this function. We have to explicitly mention Character. Way 2 : Taking Variable as Parameter putchar(a); // Display Character Stored in a(…)

Puts >> Displaying String in C Programming

Puts >> Displaying String in C Programming : Way 1 :Messaging puts(” Type your Message / Instruction “); Like Printf Statement puts() can be used to display message. Way 2 : Display String puts(string_Variable_name) ; Notes or Facts : puts is included in header file “stdio.h” As name suggest it used for Printing or Displaying(…)

Printf >> Displaying String in C Programming

Printf >> Displaying String in C Programming : Syntax : Way 1 : Messaging printf (” Type your Message / Instruction ” ) ; Way 2 : Display String printf (“Name of Person is %s “, name ) ; Notes or Facts : printf is included in header file “stdio.h” As name suggest it used(…)

Getchar : Reading or Accepting String Character by Character

getchar() : Reading or Accepting String Character by Character In C Programming we have many input/output functions that are useful for accepting input from the user. i.e scanf() | gets(). Getchar() function is also one of the function which is used to accept the single character from the user. Syntax for Accepting String and Working(…)