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
Most viewed questions in Programming and DS
1
votes
0
answers
1741
Array
Consider X[1...n] and Y[1...n] be two arrays, each containing n numbers both of which already sorted. What is the time complexity to find the median by combining two arrays? O(n) O(log n) O(nlogn) O(loglog n)
Consider X[1...n] and Y[1...n] be two arrays, each containing n numbers both of which already sorted. What is the time complexity to find the median by combining two arra...
srestha
1.1k
views
srestha
asked
Oct 28, 2017
DS
array
data-structures
+
–
2
votes
1
answer
1742
what is the output??
#include<stdio.h> int i=5; int main() { extern int j; printf("\ni=%d \nj=%d",i,j); int j=10; return 0; } OUTPUT:- i=5 j=10 but when i compile this code ,i get compilation error source of question is http://cprogrammingcodes.blogspot.in/2012/02/external-storage-class.html please explain what,s wrong
#include<stdio.h>int i=5;int main(){ extern int j; printf("\ni=%d \nj=%d",i,j); int j=10; return 0;}OUTPUT:-i=5j=10but when i compile this code ,i get compilation err...
indrajeet
1.1k
views
indrajeet
asked
Jul 18, 2016
Programming in C
programming-in-c
output
interview
storage-classes-in-c
+
–
2
votes
2
answers
1743
NIELIT 2017 DEC Scientist B - Section B: 31
Consider a complete binary tree where the left and the right sub trees of the root are max-heaps. The lower bound for the number of operations to convert the tree to a heap is: $\Omega(\log n)$ $\Omega(n\log n)$ $\Omega(n)$ $\Omega(n^2)$
Consider a complete binary tree where the left and the right sub trees of the root are max-heaps. The lower bound for the number of operations to convert the tree to a he...
admin
1.1k
views
admin
asked
Mar 30, 2020
DS
nielit2017dec-scientistb
data-structures
binary-tree
binary-heap
+
–
0
votes
1
answer
1744
Implement stack and queue using priority queue
On other sources, it is given that we need to assign high priorities to newly inserted element in case of stack otherwise low priority to newly inserted element in case of queue. My doubt here is that shouldn't ... heap priority queue and queue with min-heap priority queue keeping above assumption of assigning priorities to newly inserted element?
On other sources, it is given that we need to assign high priorities to newly inserted element in case of stack otherwise low priority to newly inserted element in case o...
pallaviamu
1.1k
views
pallaviamu
asked
Jun 17, 2018
DS
data-structures
priority-queue
descriptive
+
–
2
votes
1
answer
1745
Can any one give example of call by name in c and what is difference between call by name and value ?
hem chandra joshi
1.1k
views
hem chandra joshi
asked
Nov 12, 2017
Programming in C
programming
+
–
0
votes
0
answers
1746
#Nptel assignment
https://ide.geeksforgeeks.org/BX0OOC4rpt please explain what is wrong with the following code! The Collatz function is defined for a positive integer n as follows. f(n) = 3n+1 if n is odd n/2 if n is even We consider the repeated application of the Collatz ... positive number <= 32,000. You have to output how many times f has to be applied repeatedly in order to first reach 1.
https://ide.geeksforgeeks.org/BX0OOC4rptplease explain what is wrong with the following code!The Collatz function is defined for a positive integer n as follows.f(n) = 3n...
himgta
1.1k
views
himgta
asked
Feb 16, 2019
2
votes
2
answers
1747
UGC NET CSE | December 2013 | Part 3 | Question: 16
Match the following with respect to the programming language $:$ ... $\text{a-ii, b-iv, c-i, d-iii}$ $\text{a-ii, b-iii, c-iv, d-i}$
Match the following with respect to the programming language $:$$\begin{array}{} & \textbf{List – I} && \textbf{List – II} \\ \text{a.} & \text{Structured language} &...
go_editor
1.1k
views
go_editor
asked
Jul 27, 2016
Programming in C
ugcnetcse-dec2013-paper3
programming
+
–
2
votes
3
answers
1748
GATE Overflow | Data Structures | Test 1 | Question: 9
Which of the following statements is false? A tree with $n$ nodes has $n-1$ edges A labeled rooted binary tree can be uniquely constructed given its in-order and pre-order traversal results. A complete binary tree with $n$ internal nodes has $n+1$ ... tree of height $h$ is $2^{h+1} - 1$ where $h$ is the maximum distance of a node from root.
Which of the following statements is false?A tree with $n$ nodes has $n-1$ edgesA labeled rooted binary tree can be uniquely constructed given its in-order and pre-order ...
Arjun
1.1k
views
Arjun
asked
Oct 10, 2016
DS
go-ds-1
data-structures
binary-tree
+
–
1
votes
1
answer
1749
Number System
How do I calculate (-54)10 in hexadecimal? The way I am doing it currently is that I am first converting (54)10 into hexadecimal which is (34)16. Next I am taking 16's complement. i.e. I am doing (FF)16 - (34)16 + 1, which comes to (CA)16. Thus, (-54)10 = (CA)16. Is this the right way to convert or is there some better method ?
How do I calculate (-54)10 in hexadecimal? The way I am doing it currently is that I am first converting (54)10 into hexadecimal which is (34)16. Next I am taking 16's co...
humblefool
1.1k
views
humblefool
asked
Sep 25, 2017
Programming in C
number
system
digital-logic
+
–
1
votes
1
answer
1750
What is the Output?
#include<stdio.h> int main() { int a = 10, b = 20, c = 30, d = 40; printf("%d%d%d",a, b, c); printf("%d%d%d", d); return 0; } What is the Output and when I run it I am getting some wierd answer. Please explain ?
#include<stdio.h>int main(){int a = 10, b = 20, c = 30, d = 40;printf("%d%d%d",a, b, c);printf("%d%d%d", d);return 0;}What is the Output and when I run it I am getting so...
Prajwal Bhat
1.1k
views
Prajwal Bhat
asked
Aug 19, 2016
Programming in C
programming-in-c
undefined-behaviour
output
non-gate
+
–
2
votes
1
answer
1751
No. of Binary trees
FIve nodes labelled 1,2,3,4,5 are used to construct different binary trees. How many such binary trees can be constructed whose preorder traversal is 1,2,3,4,5 ?
FIve nodes labelled 1,2,3,4,5 are used to construct different binary trees. How many such binary trees can be constructed whose preorder traversal is 1,2,3,4,5 ?
Ashwani Kumar 2
1.1k
views
Ashwani Kumar 2
asked
Dec 9, 2016
1
votes
1
answer
1752
array
Consider a three dimensional array A[30][40][50], find the location of the array element A[5][6][7] , if the base address of array A is 150 and each element take 4 byte of memory.
Consider a three dimensional array A[30][40][50], find the location of the array element A[5][6][7] , if the base address of array A is 150 and each element take 4 byte...
turendar
1.1k
views
turendar
asked
Aug 18, 2018
Programming in C
array
+
–
0
votes
1
answer
1753
What is the difference between #include<stdio.h> and #include "stdio.h".
What is the difference between #include<stdio.h> and #include "stdio.h".
What is the difference between #include<stdio.h and #include "stdio.h".
Nitesh Choudhary
1.1k
views
Nitesh Choudhary
asked
Apr 25, 2017
Programming in C
programming-in-c
programming-in-c
+
–
0
votes
2
answers
1754
ISRO APRIL 2018
How many lines of output does the following C code produce? #include<stdio.h> main() { float sum=0.0,j=1.0,i=2.0; while (i/j > 0.001) { j=j+1; sum=sum+(i/j); printf("%f\n", sum); } } 0-9 line of output 10-19 lines of output 20-29 lines of output More than 29 lines of output
How many lines of output does the following C code produce?#include<stdio.h main() { float sum=0.0,j=1.0,i=2.0; while (i/j 0.001) { j=j+1; sum=sum+(i/j); printf("%f\n", ...
pream sagar
1.1k
views
pream sagar
asked
Apr 22, 2018
1
votes
1
answer
1755
Stack and queue
Hi please verify me We can implement a stack using only one queue. Like first insert into queue and for popping a element from stack dequeue n-1 element from queue and enque into queue and then pop last element and do the same each time......try it and verify that I am right or wrong?
Hi please verify meWe can implement a stack using only one queue.Like first insert into queue and for popping a element from stack dequeue n-1 element from queue and enqu...
Ravi prakash pandey
1.1k
views
Ravi prakash pandey
asked
Apr 7, 2018
Programming in C
data-structures
queue
stack
+
–
2
votes
1
answer
1756
Heaps
How many Binary Max-Heaps can be constructed from the elements {1,1,2,2,3,3,4,4} ?
How many Binary Max-Heaps can be constructed from the elements {1,1,2,2,3,3,4,4} ?
Balaji Jegan
1.1k
views
Balaji Jegan
asked
Mar 3, 2018
DS
binary-heap
data-structures
+
–
0
votes
1
answer
1757
isro 2018
Consider the following C code segment: #include main() { int i, j , x ; scanf("%d", &x); i = 1 ; j = 1; while ( i< 10 ) { j = j * i; i = i + 1; if (i == x) break ; } } For the program fragment above, which of the following statements about the variables i and j must be true after ... = (x - 1)!) ∧ (i = x )) D (( j = 9!) ∧ (i = 10)) V (( j = (x - 1)!) ∧ (i = x ))
Consider the following C code segment:#include main() { int i, j , x ; scanf("%d", &x); i = 1 ; j = 1; while ( i< 10 ) { j = j * i; i = i + 1; if (i == x) break ; } }For ...
sim1234
1.1k
views
sim1234
asked
Dec 2, 2018
Programming in C
programming-in-c
+
–
0
votes
2
answers
1758
made easy test series for gate cse 2023
please help me out in solving this question. the solution provided there is not upto the mark
please help me out in solving this question. the solution provided there is not upto the mark
sachidanand_dwivedi
1.1k
views
sachidanand_dwivedi
asked
Dec 21, 2022
Programming in C
data-structures
heap-sort
binary-heap
difficult
made-easy-test-series
+
–
3
votes
1
answer
1759
C Recursion
Abhishek Kumar Singh
1.1k
views
Abhishek Kumar Singh
asked
Dec 24, 2017
Programming in C
recursion
programming-in-c
+
–
1
votes
1
answer
1760
Self-Doubt
In a circular linked list last node points to the : $Head$ $Tail$ $First Node$
In a circular linked list last node points to the :$Head$$Tail$$First Node$
Phlegmatic
1.1k
views
Phlegmatic
asked
May 27, 2018
Programming in C
data-structures
circular-linked-list
linked-list
+
–
Page:
« prev
1
...
83
84
85
86
87
88
89
90
91
92
93
...
310
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register