C-Programming

C Program to Compare two Strings

This C program compares two string and tell if they are equal or not. We are taking two strings here str and str1. It is an array with 30 indexes. There are two int variables i and j which will be used to evaluate the strings. The while loops runs upto end of str[] string,

Advertisements
Advertisements
Advertisements

Program to Read an Input Keystroke using C Language

**Note: To perform this I have used Dev c++ tool. It is checked and compiled. We can simple use getchar() to read the input character in C language Code: #include<stdio.h> void main(){ char c; printf(“\n\n*****************Program to Read an Input Keystroke******************\n\n”); printf(“Enter a Character: \n”); c=getchar(); printf(“Your Input Is: %c “,c); } OUTPUT:

%d bloggers like this: