Tags » C Program

Write a C program to check a given number is Armstrong number.

#include<stdio.h>

int main()

{

int r,n,sum;

printf(“\nEnter anumber:”);

scanf(“%d”,&n);

sum=0;

while(n!=0)

{

r=n%10;

sum=sum+(r*r*r);

n=n/10;

}

printf(“\nThe sum of cube of digits=%d”,sum);

if(n=sum)

{

printf(“\nThis number is Armstrong number”); 41 more words

C Programming

Write a C program to check a number is Palindrome or not.

#include<stdio.h>

int main()

{

int n,r,rev,org;

printf(“\nEnter a number:”);

scanf(“%d”,&n);

org=n;

rev=0;

while(n!=0)

{

r=n%10;

rev=rev*10+r;

n=n/10;

}

printf(“\nReverse number is =%d”,rev);

if(org==rev)

{

printf(“\nThe number is Palindrome number”); 33 more words

C Programming

Basic Graph Data Structure to demonstrate Friendships

Graphs have numerous applications out of which Social Networks is quite popular.

In this Article I have tried to present a simple use case to demonstrate how to represent it using Adjacency Lists.   642 more words

Data Structures

Data Structures using C

Lately I have been implementing the standard Data Structures in Computer Science using the C Programming Language. These have the minimal functions to demonstrate the basic usage. 139 more words

Data Structures

Check if Number is Odd Using Bitwise - C

An odd number always has the LSB set to 1. If we AND the given number with 1, the even number will always turn out to be zero. 41 more words

Algorithms

About Neon-edu

Hello Friends Welcome to my first blog Neon-edu.

C Program

What is c?

THE C PROGRAMMING LANGUAGE

What is C?

C is a general-purpose, high-level language that was originally developed by Dennis M. Ritchie to develop the UNIX operating system at Bell Labs. 280 more words

C Programming