Computer Programming
Database Programming
C Programming

What is the C program to check whether a given binary tree is binary search tree or not?

User Avatar
Wiki User
2010-09-22 05:49:28

#include <stdio.h>

void main()

{

int digi,num,i,sum=0;

printf("Enter the number of digits:");

scanf("%d",&num);

while(i>0);

{

for(i=0;i<10000;i++)

{

digi=num;

i=digi%10;

sum=sum+i;

num=digi/10;

}

printf("The sum of digits entered is %d",sum);

}

}


Copyright © 2020 Multiply Media, LLC. All Rights Reserved. The material on this site can not be reproduced, distributed, transmitted, cached or otherwise used, except with prior written permission of Multiply.