No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
3 Posted Topics
Can any one tell me how to disable and enable ctrl c and ctrl z interrupts in a c program? also what is the use of sscanf and its syntax?
i've referred a couple of datastructure books and both give different definitions for width of a binary tree. one says its the no of nodes at a level,while another says its the longest path that can be traversed in a binary tree. can any one help me with a recursive …
#include<stdio.h> # define MAX 10 main() { int a[MAX],b[MAX],i,j,k,key,count=0; printf("\n Enter the integers"); for(i=0;i<MAX;i++) scanf("%d",&a[i]); printf("\n The elements are "); for(i=0;i<MAX;i++) printf(" %d",a[i]); printf("\nEnter the key"); scanf("%d",&key); for(i=0;i<MAX;i++) if(a[i]==key) { a[i]='#'; count++; } for(j=0;j<count;j++) for(i=0;i<MAX;i++) if(a[i]=='#') for(k=i;k>0;k--) a[k]=a[k-1]; for(j=0;j<count;j++) a[j]=0; for(i=0;i<MAX;i++) printf(" %d",a[i]); }
The End.
cuperman