Write a program that find and print how many odd numbers in
a binary tree
struct node
{
int data;
struct node *l;
struct node *r;
};
typedef struct node *n;
int oddnos(n root)
{
static int count;
n cur = root;
if(cur!=NULL)
{
if(cur->data%2==1)
count++;
oddnos(root->l);
oddnos(root->r);
}
return count;
}
| Is This Answer Correct ? | 8 Yes | 5 No |
What is the difference between proc means and proc tabulate ? explain with a simple example when you have to use means or tabulate?
main() { char *cptr,c; void *vptr,v; c=10; v=0; cptr=&c; vptr=&v; printf("%c%v",c,v); }
how to test pierrot divisor
void main() { int const * p=5; printf("%d",++(*p)); }
3 Answers Infosys, Made Easy, State Bank Of India SBI,
program to find magic aquare using array
Give a one-line C expression to test whether a number is a power of 2.
Cluster head selection in Wireless Sensor Network using C programming language.
How do you sort a Linked List (singly connected) in O(n) please mail to pawan.10k@gmail.com if u can find an anser...i m desperate to knw...
6 Answers Microsoft, MSD, Oracle,
main() { while (strcmp(“some”,”some\0”)) printf(“Strings are not equal\n”); }
main() { int i=5,j=10; i=i&=j&&10; printf("%d %d",i,j); }
main() { int i = 0xff ; printf("\n%d", i<<2); } a. 4 b. 512 c. 1020 d. 1024
main() { char c=' ',x,convert(z); getc(c); if((c>='a') && (c<='z')) x=convert(c); printf("%c",x); } convert(z) { return z-32; }