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
0
votes
0
answers
1701
Doubt : Recursion ( snippet by testbook )
Its always a confusion how Recursion works with for loop. Explain a brief.
Its always a confusion how Recursion works with for loop. Explain a brief.
HeadShot
278
views
HeadShot
asked
Jan 7, 2019
0
votes
2
answers
1702
Made easy Test
void foo(int n) { while (n! = 0) { if (!(n & 1)) printf(“*”); n = n >> 1 ; } } The number of times printf(“*”) is executed, when the value 2 raised to power 24 is passed to the function foo() is ?
void foo(int n){ while (n! = 0) { if (!(n & 1)) printf(“*”); n = n > 1 ; }} The number of times printf(“*”) is executed, whe...
mutahar abass
358
views
mutahar abass
asked
Dec 30, 2018
0
votes
0
answers
1703
Static Scope
Though parameters passed by reference , changes on "a" didn't reflect on "b" , why ?
Though parameters passed by reference , changes on "a" didn't reflect on "b" , why ?
HeadShot
1.5k
views
HeadShot
asked
Nov 11, 2018
0
votes
0
answers
1704
#madeeasy
BHOJARAM
296
views
BHOJARAM
asked
Jan 7, 2019
0
votes
1
answer
1705
Self doubt
How the below code snippet is working when the function black(“213”) is called?
How the below code snippet is working when the function black(“213”) is called?
Shadan Karim
519
views
Shadan Karim
asked
Dec 29, 2018
0
votes
0
answers
1706
Post-fix expression doubt
What is the significance of the underlined sentence ??
What is the significance of the underlined sentence ??
Nandkishor3939
235
views
Nandkishor3939
asked
Jan 9, 2019
DS
data-structures
+
–
0
votes
0
answers
1707
MadeEasy Test Series: Programming & DS - Programming In C
consider the following C code #define a(x+1) int x=2; void b() { x=9; printf("%d\n ,a); } void c() { int x=1; printf("%d\n ,a); } void main() { b(); c(); } which of the following is true output if ... 9,2 I calculated the right answer but now i want to ask what is the value of global x after the program execution is it 9 ,10 ??
consider the following C code #define a(x+1) int x=2; void b() { x=9; printf("%d\n”,a); } void c() { int x=1; printf("%d\n”,a); } void main() { b(); c(); }which of th...
Gurdeep Saini
457
views
Gurdeep Saini
asked
Dec 31, 2018
Programming in C
made-easy-test-series
programming-in-c
data-structures
+
–
1
votes
0
answers
1708
Linked list Quiz
Consider an unrolled linked list with $n$ elements.This list stores multiple elements in each node. What is the worst case time complexity to find the $k^{th}$ element if the number of nodes and the number of elements in each node are equal? $A)O(n)$ $B)O(\sqrt n)$ $C)O(nlogn)$ $D)O(n^{2})$
Consider an unrolled linked list with $n$ elements.This list stores multiple elements in each node.What is the worst case time complexity to find the $k^{th}$ element if ...
Lakshman Bhaiya
983
views
Lakshman Bhaiya
asked
Nov 18, 2018
Programming in C
data-structures
linked-list
+
–
0
votes
0
answers
1709
#stack
implementation of queue using stack deletion of second element form fornt take O(1),when insertion take O(n) correct or not
implementation of queue using stack deletion of second element form fornt take O(1),when insertion take O(n) correct or not
amit166
367
views
amit166
asked
Jan 5, 2019
1
votes
0
answers
1710
TestBook_P&DS
The following C function takes two ASCII strings and determines whether one is an anagram of the other. An anagram of a string s is a string obtained by permuting the letters in s. int anagram (char *a, char *b){ int count [128], j; for (j = 0; j < 128; j++) count[j]=0; j = 0; while (a[ ... [j]]++ 3 A: count [a[j++]]++ and B: count[b[j]]-- 4 A: count[a[j]]++ and B: count [b[j++]]--
The following C function takes two ASCII strings and determines whether one is an anagram of the other. An anagram of a string s is a string obtained by permuting the let...
Magma
466
views
Magma
asked
Dec 26, 2018
Programming in C
testbook-test-series
+
–
0
votes
1
answer
1711
made easy test
please explain this question
please explain this question
Vignaneswarkrishna
349
views
Vignaneswarkrishna
asked
Dec 31, 2018
1
votes
1
answer
1712
ME Test Series
Shadan Karim
197
views
Shadan Karim
asked
Jan 2, 2019
0
votes
0
answers
1713
Gateforum Test Series
$a=a+100$ in function foo, does it increases the value of a by 100 or just increments the address.
$a=a+100$ in function foo, does it increases the value of a by 100 or just increments the address.
Gupta731
360
views
Gupta731
asked
Jan 2, 2019
Programming in C
gateforum-test-series
programming-in-c
+
–
0
votes
1
answer
1714
Reversing Singly Linked List
To reverse a Singly Linked List is the below is correct code? (or) need to change Struct node *reverse(struct node *start) { Struct node *prev,*ptr,*next; prev=NULL; ptr=start; while(ptr!=NULL) { next=ptr->link; ptr->link=prev; prev=ptr; ptr=next; } start=prev; return start; Plz tell me, is here all link updating correctly?
To reverse a Singly Linked List is the below is correct code? (or) need to change Struct node *reverse(struct node *start) { Struct node *prev,*ptr,*next; prev=NULL; ptr=...
srestha
1.2k
views
srestha
asked
Nov 19, 2018
Programming in C
linked-list
data-structures
+
–
0
votes
1
answer
1715
ME Test Series
Shadan Karim
551
views
Shadan Karim
asked
Dec 30, 2018
1
votes
1
answer
1716
geeksforgeeks
#include<stdio.h> int main() { int a; char *x; x = (char *) &a; a = 512; x[0] = 1; x[1] = 2; printf("%dn",a); return 0; }
#include<stdio.h>int main(){ int a; char *x; x = (char *) &a; a = 512; x[0] = 1; x = 2; printf("%dn",a); return 0;}
Rudra Pratap
2.9k
views
Rudra Pratap
asked
Jul 19, 2018
0
votes
0
answers
1717
hashing
A) (1-(N / K)) ^ r b) (1-(K / N)) ^ r c) (1+(N / K)) ^ r-1 d) (1-(K / N)) ^ r-1
A) (1-(N / K)) ^ r b) (1-(K / N)) ^ r c) (1+(N / K)) ^ r-1 d) (1-(K / N)) ^ r-1
Rahul_Rathod_
428
views
Rahul_Rathod_
asked
Dec 28, 2018
DS
hashing
data-structures
probability
uniform-hashing
+
–
–1
votes
0
answers
1718
Made easy test series
Nandkishor3939
292
views
Nandkishor3939
asked
Jan 10, 2019
0
votes
0
answers
1719
TREE DS
The number of nodes of degree one in a complete binary tree of 2$^{30}$ nodes is? (1) 2$^{29}$ +1 (2) 2$^{29}$ (3) 2$^{30}$ (4) 1
The number of nodes of degree one in a complete binary tree of 2$^{30}$ nodes is?(1) 2$^{29}$ +1(2) 2$^{29}$(3) 2$^{30}$(4) 1
saurav raghaw
493
views
saurav raghaw
asked
Dec 26, 2018
0
votes
0
answers
1720
ME test series
What will be the value of z at the end of the following program? int value(int *x) { static int count; while(*x) { count = count + (*x & 1); *x>> =1; } return count; } main( ) { int a[ ]={3,5,6,4}; int y = 0 ,z = 0; for(; y < sizeof(a)/sizeof(int) ; y++) { z = a[y] + value( &a[y]); } }
What will be the value of z at the end of the following program?int value(int *x) { static int count; while(*x) { count = count + (*x & 1); *x> =1; }return count;}m...
Gaurangi Katiyar
216
views
Gaurangi Katiyar
asked
Jan 10, 2019
Page:
« prev
1
...
81
82
83
84
85
86
87
88
89
90
91
...
310
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register