# Category: “C’ Examples

## Program to find if the entered number is prime or not using recursion.

Code: https://gist.github.com/programmingfaster0226/a1383f3d4b6fff18e0c588fec6400de7 Output: Enter a number: 6 6 is not a prime number

## Program to swap value of two variables using pointer

Codes: https://gist.github.com/programmingfaster0226/400b3d68c505ff79c00d7a4b9d3aff06 outputs: Enter two numbers:   3     9 Before swapping  a=3   b=9 After   Swapping  a=9   b=3

## Program to copy one string to another string with and without using string handling function

Codes: With string handling functions: https://gist.github.com/programmingfaster0226/4b96950757a6ce40867e2ff29f827b9f 1.Outputs: string s1: Elon Musk string s2: Elon Musk 2.Without string handling functions: https://gist.github.com/programmingfaster0226/251a632a619c156d0835e12e540dfea2 2.Outputs: Enter string s1: Nepal…

## Program to find the biggest among three numbers using pointer

Codes: https://gist.github.com/programmingfaster0226/3511f4cdba1a68c2c5e6dc4aa0eb696e Outputs: Enter three values: 0  2  26 The value of a: 0     b; 2      c:26 biggest number: 26

## Program to find the sum of all the elements of an array using pointers

Codes: https://gist.github.com/programmingfaster0226/63ee6f550c7ffa5a1fce9d65873cb02c Outputs: Enter the number:6 5  8  1  5  7 sum: 32

## Program to concatenate two strings

Codes: https://gist.github.com/programmingfaster0226/35e14c3394ce4cfbe82cc0108ddb21e2 Outputs: Enter the first & last name: Mark Zuckerberg full name: MarkZuckerberg

## Program to read a sentence and delete all the white spaces and repace all “.” by “:”

Codes: https://gist.github.com/anonymous/78dbceedc8a4d05a390767d51e0d407d Output: Enter a string:Nepal is a small country. Nepalisasmallcountry:

## Program to read a sentence and count the number of words in that sencence

Codes: https://gist.github.com/anonymous/170a01ff2c1a7ee593ee0d345bbb2104 Output: Enter a sentence:I am fine. The number of words=3

## Program to compare two strings

Codes: https://gist.github.com/anonymous/3c306745b8616b539faef0a0453885c9 Output: Enter string: L Messi Enter string: Ronaldo Entered strings are not equal.

## Program to print the triangular pattern of string “UNIVERSITY”

Codes: https://gist.github.com/anonymous/5be136a204fea945a9b597d185f4dfdf Output: UN UNIV UNIVER UNIVERSI UNIVERSITY UNIVERSI UNIVER UNIV UN