C Program to find whether entered string is substring or not without using library function. Program is explained in detail. Sub String can be found using while loop.
A square containing integers arranged in an equal number of rows and columns so that the sum of the integers in any row, column, or diagonal is the same. is called magic Square.
Stack operations can be implemented using the pointer in easy manner. This article will explain you everything about the stack using pointer.
We are reading one file character by character and same character is written in the other file which is opened in writing mode.
Read the single file character by character and change the case of character to uppercase and write the character to the file opened in write mode.
In this program , base address of the array is stored inside the pointer variable and using pointer the sum of array element is computed.
Compare two files in a C Programming Program : C Program to Compare two text/data files in C Programming Check whether two files are identical or not. [crayon-61f2ddf7bc945333742567/] Explanation : Firstly Declare two file pointers for two files. Open two files in read mode. Now Inside while loop read both files character by character. Check both characters whether they are equal or not. If inside if statement ch1 = EOF and ch2=EOF then both files are said to be equal otherwise both files are non identicle.
Program to Calculate Length of the String using Pointer Write a C Program which will accept string from the user . Pass this string to the function. Calculate the length of the string using pointer. Program : Length of the String using Pointer [crayon-61f2ddf7bccb0933936441/] Output : [crayon-61f2ddf7bccb7767291708/] Explanation : gets() is used to accept string with spaces. we are passing accepted string to the function. Inside function we have stored this string in pointer. (i.e base of the string is stored inside pointer variable). Inside while loop we are [...]
C Program : Print All Arguments passed to C Program using Command Line. [crayon-61f2ddf7bd290967395511/] Output : Carry out following Steps to Run Save Program Compile Program. Run Program. Now Open Command Prompt. Move to the directory where program is saved. Type following command. [crayon-61f2ddf7bd297762548101/]
Program : A program to evaluate the power series [crayon-61f2ddf7bd61a401622256/] It uses if......else to test the accuracy. The power series contains the recurrence relationship of the type [crayon-61f2ddf7bd621044781044/] If Tn-1 (usually known as previous term) is known, then Tn (known as present term) can be easily found by multiplying the previous term by x/n. Then [crayon-61f2ddf7bd625189213386/] C Program for Exponent Series : [crayon-61f2ddf7bd629304470166/] Output : [crayon-61f2ddf7bd62c893649833/]