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 answered questions in Programming and DS
3
votes
1
answer
2551
C program o/p
main() { float a=.5, b=.7; if(b<.7) if(a<.5) printf("TELO"); else printf("LTTE"); else printf("JKLF"); }
main() { float a=.5, b=.7; if(b<.7) if(a<.5) printf("TELO"); else printf("LTTE"); else printf("JKLF"); }
Meenakshi Sharma
1.6k
views
Meenakshi Sharma
asked
Apr 4, 2018
Programming in C
programming-in-c
+
–
0
votes
1
answer
2552
C POINTER
int f(int x, int *py, int **ppz) { int y, z; **ppz += 1; z = **ppz; *py += 2; y = *py; x += 3; return x + y + z; } void main() { int c, *b, **a; c = 4; b = &c; a = &b; printf("%d ", f(c, b, a)); return 0; } Run on IDE (A) 18 (B) 19 (C) 21 (D) 22
int f(int x, int *py, int ppz){ int y, z; ppz += 1; z = ppz; *py += 2; y = *py; x += 3; return x + y + z;} void main(){ int c, *b, a; c = 4; b = &...
RISHI GUPTA 1
587
views
RISHI GUPTA 1
asked
Apr 1, 2018
1
votes
1
answer
2553
self doubt
give an o(n) algorithm to check whether the given binary tree is bst or not
give an o(n) algorithm to check whether the given binary tree is bst or not
Kaluti
531
views
Kaluti
asked
Mar 31, 2018
DS
data-structures
binary-search-tree
time-complexity
+
–
0
votes
1
answer
2554
Doubt in C-programming
The Correct answer is c but how? int main() { int a=210,b=120,c; c=a>b?1,2,3:2,5,6,7; printf("%d",c); } ans:- a) 1 b) 2 c) 3 d) Error.
The Correct answer is c but how?int main(){ int a=210,b=120,c; c=a>b?1,2,3:2,5,6,7; printf("%d",c);}ans:-a) 1b) 2c) 3d) Error.
dixit bishwash
1.2k
views
dixit bishwash
asked
Mar 31, 2018
Programming in C
programming-in-c
output
programming
+
–
0
votes
1
answer
2555
test series
pointers question, can someone please explain me solution
pointers question, can someone please explain me solution
mehul vaidya
232
views
mehul vaidya
asked
Mar 30, 2018
1
votes
1
answer
2556
test series
Stack valid permutation , They haven't mentioned anywhere that input is in ascending order
Stack valid permutation , They haven't mentioned anywhere that input is in ascending order
mehul vaidya
202
views
mehul vaidya
asked
Mar 30, 2018
0
votes
1
answer
2557
testseries
Data structure for loop. What is oxf ? can somebody explain
Data structure for loop. What is oxf ? can somebody explain
mehul vaidya
247
views
mehul vaidya
asked
Mar 30, 2018
1
votes
1
answer
2558
query
from where we can practice different variety of programming questions related to output except previous year
from where we can practice different variety of programming questions related to output except previous year
Kaluti
327
views
Kaluti
asked
Mar 30, 2018
3
votes
1
answer
2559
self doubt
#include <stdio.h> main() { float a ; double b ; scanf("%f %lf",&a, &b); if(a==b) printf ("true\n"); else if(a>b) printf("a>b"); else if(a<b) printf("a<b"); } Case 1: input $a=1, b=1$ output = true ... $a = 1.01, b= 1.01$ output = a<b Can anyone explain output of Case2 and Case3
#include <stdio.h main() { float a ; double b ; scanf("%f %lf",&a, &b); if(a==b) printf ("true\n"); else if(a>b) printf("a>b"); else if(a<b) printf("a<b"); } Case 1: inp...
Raj Kumar 7
387
views
Raj Kumar 7
asked
Mar 30, 2018
Programming in C
programming-in-c
+
–
1
votes
1
answer
2560
Self-doubt
#include <stdio.h> main() { if (sizeof(int) > -1) printf("True"); else printf("False"); } I expect output is True. But the output is False. Why? explain!!
#include <stdio.h main() { if (sizeof(int) -1) printf("True"); else printf("False"); }I expect output is True. But the output is False. Why? explain!!
Raj Kumar 7
748
views
Raj Kumar 7
asked
Mar 30, 2018
Programming in C
programming-in-c
+
–
1
votes
1
answer
2561
self doubt
#include<stdio.h> main() { char *p = 0; *p = 'a'; printf("value in pointer p is %c\n",*p); } What is the output of this code ? Why?
#include<stdio.h main() { char *p = 0; *p = 'a'; printf("value in pointer p is %c\n",*p); }What is the output of this code ? Why?
Raj Kumar 7
391
views
Raj Kumar 7
asked
Mar 30, 2018
Programming in C
programming-in-c
+
–
0
votes
1
answer
2562
Fibnocii heap
what is Potential function in Fibonacci heap (i dont remember the question ) plz explain with example
what is Potential function in Fibonacci heap (i dont remember the question ) plz explain with example
akshat sharma
663
views
akshat sharma
asked
Mar 30, 2018
DS
data-structures
binary-heap
descriptive
+
–
1
votes
1
answer
2563
What is correct about statements S1 and S2?
$S1$: The depth of a breadth-first search tree on an undirected graph $G = (V, E)$ from an arbitrary vertex $v \in V$ is the diameter of the graph $G$. (The diameter $d$ of a graph is the smallest $d$ such that ... graph has exactly one topological ordering. What is correct about statements $S1$ and $S2$? False, False False, True True, False True,True
$S1$: The depth of a breadth-first search tree on an undirected graph $G = (V, E)$ from an arbitrary vertex $v \in V$ is the diameter of the graph $G$. (The diameter $d$ ...
Sandy Sharma
461
views
Sandy Sharma
asked
Mar 29, 2018
DS
graph-theory
+
–
1
votes
1
answer
2564
self doubt
Give an algorithm for finding the height or depth of the tree
Give an algorithm for finding the height or depth of the tree
Kaluti
338
views
Kaluti
asked
Mar 28, 2018
DS
data-structures
binary-tree
+
–
0
votes
1
answer
2565
C programming
#include<stdio.h> int main() { char *x; int a = 512; x = (char *) &a; x[0] = 1; x[1] = 2; printf("%d\n",a); return 0; } What is the output of above program? Machine dependent $513$ $258$ Compiler Error
#include<stdio.h int main() { char *x; int a = 512; x = (char *) &a; x[0] = 1; x = 2; printf("%d\n",a); return 0; }What is the output of above program?Machine dependent$...
Prince Sindhiya
308
views
Prince Sindhiya
asked
Mar 26, 2018
Programming in C
programming-in-c
pointers
+
–
0
votes
1
answer
2566
C Programming
#include<stdio.h> typedef int ARRAY[10][10]; int main() { ARRAY arr[2]; printf("Size is %d",sizeof(arr)); } The program on running produces output Size is $800$ I know typedef is used for providing alternate names to existing datatypes. Can someone explain what's happening? Or correct me
#include<stdio.h typedef int ARRAY[10][10]; int main() { ARRAY arr ; printf("Size is %d",sizeof(arr)); } The program on running produces output Size is $800$I know typede...
gauravkc
305
views
gauravkc
asked
Mar 26, 2018
Programming in C
programming-in-c
output
programming
+
–
2
votes
1
answer
2567
#Binary_heap
We have a binary heap with given n elements and now we want to insert n more elements, then what is the time required for insert those elements i) if elements inserted one after another and ii) not necessarily one after other??
We have a binary heap with given n elements and now we want to insert n more elements, then what is the time required for insert those elements i) if elements inserted on...
G Shaheena
365
views
G Shaheena
asked
Mar 25, 2018
DS
binary-heap
time-complexity
+
–
0
votes
1
answer
2568
SAnfoundary
What data structure would you most likely see in a non-recursive implementation of a recursive algorithm? Linked List Stack Queue Tree please explain also
What data structure would you most likely see in a non-recursive implementation of a recursive algorithm?Linked ListStack QueueTreeplease explain also
Moin Mukhtar
1.2k
views
Moin Mukhtar
asked
Mar 23, 2018
Programming in C
data-structures
recursion
+
–
6
votes
1
answer
2569
Binary Tree
What is the number of binary trees with 4 nodes which when traversed in pre-order gives the sequence 1,2,3,4?
What is the number of binary trees with 4 nodes which when traversed in pre-order gives the sequence 1,2,3,4?
srestha
751
views
srestha
asked
Mar 22, 2018
DS
data-structures
binary-tree
+
–
1
votes
1
answer
2570
Gate-2011
Pointer to Strings Please clear this concept check this program #include<stdio.h> #include<string.h> int main () { char *ptr = "Gateoverflow"; printf ("String = %s", ptr); //1 printf ("\tAddress of string literal = %u\ ... of string literal = $4195892$ Doubt : Why first print statement does not print the addresses of first character of the string ?
Pointer to StringsPlease clear this concept check this program #include<stdio.h #include<string.h int main () { char *ptr = "Gateoverflow"; printf ("String = %s", ptr); /...
hsmart
694
views
hsmart
asked
Mar 20, 2018
Programming in C
programming-in-c
+
–
Page:
« prev
1
...
123
124
125
126
127
128
129
130
131
132
133
...
310
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register