Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Webpage
Programming in C.
Recursion.
Filter
Recent
Hot!
Most votes
Most answers
Most views
Previous GATE
Featured
Hot questions in Programming and DS
1
votes
1
answer
3541
Programming in C
#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 -1 and not 255?
#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 -...
Vasu Srivastava
1.1k
views
Vasu Srivastava
asked
Aug 18, 2017
Programming in C
programming-in-c
pointers
output
non-gate
+
–
2
votes
2
answers
3542
Ace Test Series: Programming & DS - Programming
what will be the output: (a) 3 5 8 8 3 (b) 3 5 7 8 8 (c) compilation error
what will be the output:(a) 3 5 8 8 3 (b) 3 5 7 8 8 (c) compilation error
Prateek Raghuvanshi
448
views
Prateek Raghuvanshi
asked
Oct 10, 2017
Programming in C
ace-test-series
programming
+
–
1
votes
1
answer
3543
4.Programming
int main() { char ch=1; while(ch<256) ch++; printf("loop end"); return 0; } My doubt here is , will it give undefined behaviour? As we are storing integer value inside character variable and also is incrementation of character pointer will give some error?
int main() { char ch=1; while(ch<256) ch++; printf("loop end"); return 0; }My doubt here is , will it give undefined behaviour? As we are storing integer value inside cha...
srestha
440
views
srestha
asked
Oct 17, 2017
Programming in C
programming-in-c
programming
+
–
1
votes
1
answer
3544
made easy test series
vipul verma
1.1k
views
vipul verma
asked
Aug 23, 2017
Programming in C
data-structures
binary-search-tree
binary-heap
made-easy-test-series
+
–
0
votes
0
answers
3545
#Hashing
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 probed if a collision occurs at position 5? A). 4 B). 5 C). 8 D). 6
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 ...
shivangi5
347
views
shivangi5
asked
Oct 31, 2017
Programming in C
hashing
+
–
–1
votes
0
answers
3546
C PROGRAM OUTPUT
Parshu gate
209
views
Parshu gate
asked
Nov 6, 2017
Programming in C
programming-in-c
+
–
1
votes
0
answers
3547
#Double linked list
Abhijeet_Kumar
328
views
Abhijeet_Kumar
asked
Oct 17, 2017
5
votes
1
answer
3548
c programming
What will be the output of the program If characters 'a', 'b' and 'c' enter are supplied as input? #include<stdio.h> int main() { void fun(); fun(); printf("\n"); return 0; } void fun() { char c; if((c = getchar())!= '\n') fun(); printf("%c", c); } [A]. abc abc [B]. bca [C]. Infinite loop [D]. c,b,a
What will be the output of the program If characters 'a', 'b' and 'c' enter are supplied as input?#include<stdio.h int main() { void fun(); fun(); printf("\n"); return 0;...
suvasish pal
1.1k
views
suvasish pal
asked
Aug 26, 2017
Programming in C
programming-in-c
+
–
0
votes
1
answer
3549
UGC NET CSE | August 2016 | Part 2 | Question: 23
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})$
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})$
makhdoom ghaya
9.1k
views
makhdoom ghaya
asked
Sep 26, 2016
DS
ugcnetcse-aug2016-paper2
data-structures
binary-search-tree
+
–
0
votes
1
answer
3550
output of program
#include <stdio.h> int main() { //int a; char c='a'; switch(c){ case 'a' && 1:printf("gate"); case 'b' && 1:printf("cse"); break; default: printf("2018"); } return 0; } what is the output for the program?
#include <stdio.h>int main(){ //int a; char c='a'; switch(c){ case 'a' && 1:printf("gate"); case 'b' && 1:printf("cse"); break...
$ruthi
267
views
$ruthi
asked
Oct 27, 2017
1
votes
0
answers
3551
string length
#include <stdio.h> #include <string.h> void fun(char *arr) { int i; unsigned int n = strlen(arr); printf("n = %d\n", n); for (i=0; i<n; i++) printf("%c ", arr[i]); } // Driver program int main() { ... code ? answer given n=11 siddissidj@ doubt why strlen is 11 , is it not 9 ? which 2 character are extra .... someone give detail explaination
#include <stdio.h>#include <string.h>void fun(char *arr){int i;unsigned int n = strlen(arr);printf("n = %d\n", n);for (i=0; i<n; i++) printf("%c ", arr[i]);}// Driver ...
sid1221
437
views
sid1221
asked
Oct 22, 2017
1
votes
0
answers
3552
queue
A queue is implemented using two stack A and B. Consider the following code void enqueue(int value) { While (!B.is Empty()) A.push(B.Pop()); A. push (value); } int dequeue () { While (!A.is Empty()) {X} return B.Pop(); } if enqueue is implemented using two stacks A & B With ... )); B) B.Push(A.Pop()); C) A.Pop(B. Push ()); D) B.Pop(A. Push ()); what is difference between option b,d???
A queue is implemented using two stack A and B. Consider the following code void enqueue(int value){While (!B.is Empty())A.push(B.Pop());A. push (value);}int dequeue (){W...
Hira Thakur
733
views
Hira Thakur
asked
Oct 1, 2017
DS
queue
+
–
0
votes
0
answers
3553
C Programming
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 integral parts of (a) $\log_{2}(n)+1$ (b) $\log_{2}(n+1)+2$ (c) $\log_{2}(n-1)+1$ (d) None of these
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...
amaity
262
views
amaity
asked
Oct 31, 2017
3
votes
1
answer
3554
#DS #Graphs
Tell me 1. Possible number of BINARY TREES with n vertices ? 2. Possible number of BINARY SEARCH TREES with n vertices ? 3. Possible number of TREES with n vertices ? 4. Possible number of LABELED Trees with n vertices? 5. Possible number of UNLABELED Trees with n vertices? Also, When Cayley's Formula is applied and when Catalan Number is applied ?
Tell me1. Possible number of BINARY TREES with n vertices ? 2. Possible number of BINARY SEARCH TREES with n vertices ?3. Possible number of TREES with n vertices ?4. Pos...
Abbas2131
382
views
Abbas2131
asked
Oct 12, 2017
5
votes
3
answers
3555
c programming
Will it result in to an error if a header file is included twice? [A]. Yes [B]. No [C]. It is compiler dependent
Will it result in to an error if a header file is included twice?[A].Yes[B].No[C].It is compiler dependent
suvasish pal
626
views
suvasish pal
asked
Aug 26, 2017
Programming in C
programming-in-c
non-gate
+
–
1
votes
1
answer
3556
Programming in c
#include<stdio.h> int main() { Float x=0.1; Printf("%d%d%d",sizeof(x),sizeof(0.1),sizeof(0.1f));
#include<stdio.h>int main(){Float x=0.1;Printf("%d%d%d",sizeof(x),sizeof(0.1),sizeof(0.1f));
S .shubham
502
views
S .shubham
asked
Oct 5, 2017
0
votes
1
answer
3557
geeks quiz
Parshu gate
605
views
Parshu gate
asked
Sep 26, 2017
Programming in C
programming-in-c
output
+
–
2
votes
1
answer
3558
Tree traversal
dragonball
290
views
dragonball
asked
Oct 15, 2017
Programming in C
data-structures
+
–
4
votes
1
answer
3559
c programming
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(); } //A. 1,20 // B. 1,20,1,20 // c. 1,2 // D. 1,2,20,20
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...
suvasish pal
853
views
suvasish pal
asked
Aug 22, 2017
3
votes
3
answers
3560
ME-Tree Traversal
KISHALAY DAS
575
views
KISHALAY DAS
asked
Oct 28, 2016
Page:
« prev
1
...
173
174
175
176
177
178
179
180
181
182
183
...
310
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register