Which statement is true?
A. Functions are declared in header files
B. Functions are defined in header files
Latest Answer: pointer is depicted by '*' . this is  to differentiate a pointervariable from normal variable. it will tell the compiler that it is not a normal variable, but it is a pointer variable which is holding the address of another variable. so use of ...
#include#includevoid main(){static int a[]={0,1,2,3,4};clrscr();int *p[]={a,a+1,a+2,a+3,a+4};printf("n%un%un%d",p,*p,*(*p));getch();}What #include#includevoid main(){static int a[]={0,1,2,3,4};clrscr();int *p[]={a,a+1,a+2,a+3,a+4};printf("n%un%un%d",p,*p,*(*p));getch();}What will be the output of above program?How?
Latest Answer: A[2][3]={1,2,3,4,5,6};for(i=0;i
Read Answers (2) |
Asked by : write a program to print an 2D array in spiral manner
#includevoid fun(int);void main(){ inta; a=3; fun(a); }void fun(int){ if(n>0) { fun(--n); printf("%d",n); fun(--n); } }
What is the output of the above program? Explain.
0 1 2 0
Given the values of two nodes in a *binary search tree*, write a cprogram to find the lowest common ancestor. You may assume that bothvalues already exist in the tree.The function prototype is as follows:int FindLowestCommonAncestor(node* root,int value1,int value) 20 / 8 22 / 4 12 / 10 14I/P : 4 and 14O/P : 8(Here the common ancestors of 4 and 14, are {8,20}. Of {8,20}, the lowest one is 8).
One of the solution can be to find out postorder traversal taking each node one by one. This postorder function should return true if both the values (v1 & v2) are found in the postorder traversal of the
Latest Answer: The following program compiles with 'C' with a warning about return type of main. But it wouldn't compile with 'C++', it gives error there:void main(){return;} ...
Latest Answer: Yes. /*Array of Strings*/char* _animals[] = { "Tiger","Lion", "Dog", "Cat" };/*Array of ints*/int numbers[] = {1,2,3,4,5};number of elements of such arrays can be obtained bycount = (sizeof(_animals)/sizeof(_animals[0])); ...
int
Latest Answer: void ...
Latest Answer: You can also use functions like fprintf(),fputs(),gets(),fgets() instead of printf() and scanf().Here is a sample example#includeint main(){ char name[20]=""; char city[20]=""; puts("nEnter ...
View page << Previous 7 8 9 10 [11] 12 13 14 15 16 Next >>

Go Top