Highest voted questions in Programming and DS

1 votes
1 answer
2582
Analyze what is happening and why?int *ptr=(int*)0X12341230; int *ptr2=((int*)(((char*)ptr)+1));char *ptr=(char*) 0X12341230; void *ptr2=ptr+1;
1 votes
0 answers
2583
How can we do casting a pointer? Will that not give error?
1 votes
0 answers
2584
int main(void) { // your code goes here int main(){FILE *fp;char ch, str[7];fp=fopen("test.c", "r"); /* file 'try.c' contains "This is manipal" */fseek(fp, 9L, SEEK...
1 votes
1 answer
2585
some random numbers are given and asked to construct a balanced BST..what will be the time complexity?numbers in sorted order are given and asked to construct a balanced ...
1 votes
1 answer
2586
What is difference between declaration and definition ...in c ?please explain with examples
1 votes
2 answers
2587
#include<stdio.h>int main(){ int a = {1, 2}; void *ptr = &a; ptr = ptr + sizeof(int); printf("%d", *(int *)ptr); return 0;}what will be output ... explain...
1 votes
1 answer
2588
#include<stdio.h>void main(){ int a=5; int b=f(a); printf("%d",b);}int f(int x){ x=+5; return x;}Give output with explanation
1 votes
1 answer
2590
Given a set of n elements not all distinct, the majority element is the one with frequency >=n/2. So majority element is always thea. Maximum elementb. Minimum elementc....
1 votes
2 answers
2592
Please tell the output with explanation!#include<stdio.h>int main(){int a,b;printf("%d ",12);printf("%d ",143);printf("%d ",scanf("%d%d",&a,&b));}
1 votes
0 answers
2593
Please tell the output with explanation!#include<stdio.h>struct s{ unsigned a:5; unsigned b:5; unsigned c:5; unsigned d:5;}v={1, 2};main(){ printf("size of v =...
1 votes
1 answer
2594
if t is a complete n tree with exactly three level ,prove that the no. of vertices of t must be 1+kn,where 2<=k<=n+1
1 votes
1 answer
2596
1 votes
1 answer
2597
<code>#include <stdio.h int main() { unsigned int b = 20; b = ~b; printf("%d\n", b); }</code>
1 votes
1 answer
2598
1 votes
1 answer
2599
1 votes
0 answers
2600