C Program to Print Mirror of Right Angled Triangle

Pyramid Program in C Programming - Mirror Image of Right Angled Triangle Print the Following Pattern of Pyramid [crayon-609dd77acbfec791666287/] Program : [crayon-609dd77acbff6028575758/] Explanation of C Program :'space_count' variable is used as subscript variable used in for loop. 'no_of_spaces' variable is used to keep track of no_of_spaces to be printed. Note that Space width mentioned in printf of second inner loop is "%2c" , that's why we have printed 2 spaces inside first inner loop.Why 3 for loops are used ?Outer For Loop - Specify No of Rows to be Printed First [...]

First Turbo Graphics Program in C Language

First Graphic Program [crayon-609dd77accd72175737330/] Requirement to Run This ProgramGraphics.h Header File Graphics.lib library file Graphics driver (BGI file) 640x480 VGA monitorHeader File : graphics.hAll Graphical Functions are Included in Graphics.h After Including graphics.h Header File [ You can get access graphical functions ]You must Know Following Things before Learning Turbo Graphics InitGraph :Initializes the graphics system. In C Program execution starts with main() similarly Graphics Environment Starts with this function. initgraph() initializes the graphics system by loading a graphics driver from disk (or validating a registered driver) then [...]

Printing Text in Graphics Using Outtextxy Function

Program : [crayon-609dd77acd0c3497477571/] Explanation : [crayon-609dd77acd0ca461257149/]This Function is Similar to Printf Statement. Printf Prints Text on Screen in "Text Mode" while outtextxy() function Prints Text onto Screen in "Graphics Mode". This Function Accepts 3 Parameters.Syntax : [crayon-609dd77acd0cd117996831/]Parameter ExplanationX_Co-ordinate Specifies X Co-ordinateY_Co-ordinate Specifies Y Co-ordinateText String/Text to be Printed On the Specified Co-ordinates

C Program to Implement Binary Search Tree Traversal

C Program to implement Binary Search Tree Traversal[crayon-609dd77acdcaa911811947/] Reference : http://en.wikipedia.org/wiki/Tree_traversal Program : [crayon-609dd77acdcb5118241093/] Explanation :get_node() function will allocate memory dynamically and allocate one node. if below condition is satisfied then we can say that we are going to create first node of the tree. (i.e Tree is empty and this created node is very first node)[crayon-609dd77acdcbf746394419/]If condition does not satisfied then we can say that we have already node in a tree. (i.e this node which we have created is not a first [...]

C Program to Print Square of Each Element of 2D Array Matrix

C Program : C Program to Print Square of Each Element of 2D Matrix [crayon-609dd77ace26f421519196/] Output : [crayon-609dd77ace277069894918/] Explanation : Note 1 :Wherever a macro name occurs in Program the Preprocessor Substitutes the code of the macro at that position. Whenever we use variable name instead of Macro it will throw error.[crayon-609dd77ace27b570441064/]

C Program to Demonstrates binary expressions using floating-point arithmetic

Program : C Program to demonstrates binary expressions using floating-point arithmetic [crayon-609dd77ace62a650827053/] Output : [crayon-609dd77ace631747010061/] Floating Pointer Can perform following Operations :Addition Subtraction Division MultiplicationNote : Floating Point Data Type Can't Perform Modulus Operation [crayon-609dd77ace634316164486/] Output : [crayon-609dd77ace637143993377/]

C Program to Add two numbers using Command Line Arguments Parameters

C Program : C Program to Add two numbers using Command Line Arguments [crayon-609dd77aced58859015856/] Output : [crayon-609dd77aced60164390881/] Steps to be followed to execute program using Command Line Argument inside Borland C/C++ Compiler :Step 1 : Write a Program Step 2 : Open Command Prompt inside Borland C/C++. Step 3 : Click on DOS Shell.Step 4 : Inside Command Prompt type this command.[crayon-609dd77aced64195976822/]Step 5 : Hit Enter , You will get following Output.[crayon-609dd77aced67484330986/]Step 6 : Type "exit" command to return to Turbo C/C++ Screen

C Program to Encode a String and Display Encoded String

Problem Statement : Read a five-letter word into the computer, then encode the word on a letter-by-letter basis by subtracting 30 from the numerical value that is used to represent each letter. Thus if the ASCII character set is being used, the letter a (which is represented by the value 97) would become a C (represented by the value 67), etc. Write out the encoded version of the word. Test the program with the following words: white, roses, Japan, [...]

C program to Delete all occurrences of Character from the String.

Program : Delete all occurrences of Character from the String [crayon-609dd77acf4b5830715668/] Output : [crayon-609dd77acf4bd371415443/] Explanation :In this tutorial we have accepted one string from the user and character to be deleted from the user. Now we have passed these two parameters to function which will delete all occurrences of given character from the string. Whole String will be displayed as output except given Character .Program Code Explanation : [crayon-609dd77acf4c0832144937/]If character is other than given character then store it into another array.

C Program to Calculate Area and Circumference of circle

C Program to find area and circumference of circle [crayon-609dd77ad10e0523348803/] Output : [crayon-609dd77ad10e7677430166/] Explanation of Program : In this program we have to calculate the area and circumference of the circle. We have following 2 formulas for finding circumference and area of circle. [crayon-609dd77ad10eb930175922/] and [crayon-609dd77ad10ed588285137/] In the above program we have declared the floating point variable PI whose value is defaulted to 3.14.We are accepting the radius from user. [crayon-609dd77ad10f0298983750/] Download C Program : [box style="download"]Download Area Of Circle Program | Right Click and Save As[/box]

C Program to Input Password for Validation of User name

How to Input Password in C ? [crayon-609dd77ad2352073882687/] Output : [crayon-609dd77ad235a666981177/]Explain ? [crayon-609dd77ad235d681212954/]Accept Character without Echo [ without displaying on Screen ] getch will accept character and store it in "ch"[crayon-609dd77ad2360644179901/]ASCII Value of "Enter Key" is 13 Stop Accepting Password Characters after "Enter" Key.[crayon-609dd77ad2363769906010/]ASCII Value of "BACKSPACE" is 8 After hitting "backspace"following actions should be carried out -Cursor Should be moved 1 character back. Overwrite that character by "NULL". After Writing NULL again cursor is moved 1 character ahead so again move cursor 1 character back . Decrement Current [...]