Hot questions in Programming and DS

1 votes
1 answer
3541
#include <stdio.h int main(void){ int i=511; char *p = (char *)&i; printf("%d", *p); }OK so why take 2's complement and not simple binary number? Means, why is C giving -...
2 votes
2 answers
3542
1 votes
1 answer
3543
0 votes
0 answers
3545
Consider a hashing function that resolves collision by quadratic probing .Assume the address space is indexed from 1 to 6. Which of the following locations will never be ...
–1 votes
0 answers
3546
1 votes
0 answers
3547
0 votes
1 answer
3549
The runtime for traversing all the nodes of a binary search tree with $n$ nodes and printing them in an order is$O(\lg n)$$O(n \lg n)$ $O(n)$$O(n^{2})$
0 votes
1 answer
3550
#include <stdio.h>int main(){ //int a; char c='a'; switch(c){ case 'a' && 1:printf("gate"); case 'b' && 1:printf("cse"); break...
0 votes
0 answers
3553
If variable can take any integral values from $0$ to $n$, where $n$ is a constant integer, then the variable can be represented as a bits field whose width is the integra...
5 votes
3 answers
3555
Will it result in to an error if a header file is included twice?[A].Yes[B].No[C].It is compiler dependent
1 votes
1 answer
3556
#include<stdio.h>int main(){Float x=0.1;Printf("%d%d%d",sizeof(x),sizeof(0.1),sizeof(0.1f));
0 votes
1 answer
3557
2 votes
1 answer
3558
4 votes
1 answer
3559
What is the output of the program#include<stdio.h>#include<conio.h>void main() {int i,j=20;clrscr();for(i=1;i<3;i++){ printf("%d,",i);continue;printf("%d",j);break;}getch...
3 votes
3 answers
3560