Recent questions in Programming and DS

2 votes
1 answer
4561
#include<stdio.h #include<stdlib.h int main() { int p=9; printf("%d %d",p++,++p); } how it executed and also how printf function executed left to right or right to left?
2 votes
1 answer
4562
The children's subtrees each have size at most 2n/3 - the worst case occurs when the last row of the tree is exactly half fullPlz explain this so i get a picture in my he...
1 votes
1 answer
4563
#include<stdio.h #define CUBE(x) (x*x*x) int main() { int a, b=3; a = CUBE(b++); printf("%d, %d ", a, b); return 0; }Why this give 27,6 as output?
6 votes
4 answers
4564
#include‬<stdio.h int main() { char *s[] = { "knowledge","is","power"}; char p; p = s; printf("%s ", ++*p); printf("%s ", *p++); printf("%s ", ++*p); return 0; }
1 votes
1 answer
4565
What is output of the program?? And why??
3 votes
2 answers
4567
Which of the following is not an inherent application of stack?Implementation of recursionEvaluation of a postfix expressionJob schedulingReverse a string
3 votes
3 answers
4568
Suppose you are given a binary tree with n nodes, such that each node has exactly eiter zero or two children. The maximum height of the tree will be$\frac{n}{2}-1$$\frac{...
1 votes
0 answers
4570
6 votes
3 answers
4571
int i; i=5; i=i++; printf("%d",i);What is output of this program??Is it undefined behavior ?? Why??
1 votes
1 answer
4572
int main() { char *p = "Good"; char a[] = "Good"; printf("%d\t%d\t%s\n", sizeof(p), sizeof(*p)); }According to me ans shld be 2,1but on running o/p is 8,1. How 8 is the o...
3 votes
1 answer
4573
const int perplexed = 2; #define perplexed 3 main() { #ifdef perplexed #undef perplexed #define perplexed 4 #endif printf("%d",perplexed); }a. 0 b. 2 c. 4 d. none of the...
3 votes
1 answer
4574
What is the value returned by the function f given below when n=100?let f(int n) { if (n==0) then return n; else return n+f(n-2); }2550255652205520
4 votes
2 answers
4575
7 votes
1 answer
4576
A clique in a simple undirected graph is a complete subgraph that is not contained in any larger complete subgraph. How many cliques are there in a graph shown below?2456...
3 votes
2 answers
4577
The number of different spanning trees in complete graph, $K_4$ and bipartite graph, $K_{2,2}$ have ____ and ___ respectively.14, 1416, 1416, 414, 4
1 votes
2 answers
4578
1 votes
2 answers
4579
3 votes
3 answers
4580