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
Recent questions in Programming and DS
2
votes
3
answers
101
. What will be the value returned by the following function, when it is called with 11? recur (int num){ if ((num / 2)! = 0) return (recur (num/2) *10+num%2); else return 1; } (a) Function does not return any value, because it goes into an infinite loop (b) 11 (c) 1011 (d) None of these
. What will be the value returned by the following function, when it is called with 11?recur (int num){if ((num / 2)! = 0 ) return (recur (num/2) *10+num%2);else return 1...
Laahithyaa VS
934
views
Laahithyaa VS
asked
Sep 9, 2023
Programming in C
programming-in-c
+
–
1
votes
1
answer
102
c made easy test series
if X and Y denote the no of 0,1 then the value of 2X + y is
if X and Y denote the no of 0,1 then the value of 2X + y is
jugnu1337
293
views
jugnu1337
asked
Sep 3, 2023
2
votes
1
answer
103
programming in c
#include <stdio.h> int f(int x) { if(x%2==0) { return f(f(x-1)); } else return (x++); } int main() { printf("%d",f(12)); return 0; } how is this code working as it is a repetition after f(f(11))???
#include <stdio.h int f(int x) { if(x%2==0) { return f(f(x-1)); } else return (x++); } int main() { printf("%d",f(12)); ret...
rupamsardar
482
views
rupamsardar
asked
Aug 30, 2023
Programming in C
programming-in-c
+
–
0
votes
0
answers
104
Made Easy DFS video Lecture
Caption
Caption
BHANU pratap sharma
247
views
BHANU pratap sharma
asked
Aug 23, 2023
Programming in C
programming
+
–
3
votes
5
answers
105
C/C++ operator precedence
Why is the output of the below program 36? int main(){ int a = 1; int b = ++a * ++a * ++a; printf("%d", b ); return 0; }
Why is the output of the below program 36? int main(){ int a = 1; int b = ++a * ++a * ++a; printf("%d", b ); return 0; }
arpit.bagri
1.1k
views
arpit.bagri
asked
Aug 6, 2023
Programming in C
programming-in-c
operator-precedence
+
–
5
votes
2
answers
106
Gate@Zeal Workbook - C programming
What will be the output of the following code? _______ #include <stdio.h> int main(){ char val=250; int ans; ans= val+ !val + ~val + ++val; printf("%d", ans); return 0; }
What will be the output of the following code? _______ #include <stdio.h int main(){ char val=250; int ans; ans= val+ !val + ~val + ++val; printf("%d", ans); return 0; }
saurabh0709
1.2k
views
saurabh0709
asked
Aug 1, 2023
Programming in C
zeal
programming-in-c
operator-precedence
+
–
1
votes
2
answers
107
Loops (while and for)
In the picture below: Can anyone explain to me why while' loop starting from 2 but in the case of for' loop it is starting from 1 (although i++ is available for both in Program 1 and Program 2) and also in the case of while' loop the outputs are ... ' loop the outputs are same although in Program 2 it is post increment (i++) and in Program 4 it is pre increment (++i).
In the picture below:Can anyone explain to me why ‘while’ loop starting from 2 but in the case of ‘for’ loop it is starting from 1 (although i++ is available for ...
Gopal6854
583
views
Gopal6854
asked
Jul 29, 2023
Programming in C
programming
loop
+
–
2
votes
1
answer
108
Arrays || C Programming
# include <stdio.h> void print(int arr[]) { int n = sizeof(arr)/sizeof(arr[0]); int i; for (i = 0; i < n; i++) printf("%d ", arr[i]); } int main() { int arr[] = {1, 2, 3, 4, 5, 6, 7, 8}; print(arr); return 0; } On GFG output is 1 2 I can’t understand the solution. Help would be appreciated!!
# include <stdio.h void print(int arr[]){ int n = sizeof(arr)/sizeof(arr[0]); int i; for (i = 0; i < n; i++) printf("%d ", arr[i]);} int main(){ int arr[] = ...
Sparsh-NJ
1.2k
views
Sparsh-NJ
asked
Jul 29, 2023
Programming in C
array
programming-in-c
+
–
0
votes
1
answer
109
UGC NET CSE | June 2023 | Part 2: 9
Consider a hash table of size seven with starting index zero and a hash function $(6 x+3) \bmod 4$. Assuming the hash table is initially empty. Which of the following is the content of the table when the sequence $1,3,8,10,5$, is inserted into the table using closed hashing? Here " denotes ... $3,8,1,$_,$10,5$ _,$3,8,1$,_,$10,5$ _$1,3,8,10,5$,_
Consider a hash table of size seven with starting index zero and a hash function $(6 x+3) \bmod 4$. Assuming the hash table is initially empty. Which of the following is ...
admin
701
views
admin
asked
Jul 28, 2023
DS
ugcnetcse-june2023-paper2
data-structures
hashing
+
–
3
votes
1
answer
110
C programming | Union
What is the output of the code given below? #include <stdio.h> #include <string.h> union sample { int i; float f; char c; double d; char str[20]; }; int main() { // union sample sm; printf("Memory size occupied by sample : %d", sizeof(union sample)); return 0; }
What is the output of the code given below? #include <stdio.h #include <string.h union sample { int i; float f; char c; double d; char str[20]; }; int main() { // union s...
arpit.bagri
672
views
arpit.bagri
asked
Jul 26, 2023
Programming in C
programming-in-c
+
–
0
votes
1
answer
111
Self Doubt
How are two numbers(int) generally stored in computers ?
How are two numbers(int) generally stored in computers ?
Psy Duck
314
views
Psy Duck
asked
Jul 22, 2023
Programming in C
#programming
#number_representation
+
–
0
votes
1
answer
112
Self Doubt
I have a doubt on simple Queue Implementation by an array Assume Queue is full(of n size),Front is pointing to first element and Rear is pointing to last element If we dequeue the element then front's element will get deleted, Now do we have to ... space is empty) I am not talking about circular queue concept,I am just talking about simple queue implementation using array(Not circular).
I have a doubt on simple Queue Implementation by an arrayAssume Queue is full(of n size),Front is pointing to first element and Rear is pointing to last elementIf we dequ...
viral8702
323
views
viral8702
asked
Jul 22, 2023
DS
queue
self-doubt
data-structures
+
–
0
votes
2
answers
113
self doubt
#include <stdio.h> int main() { int x = -5, y = 8; x = x + y - (y = x); printf("%d", x * y); return 0; } what will be the o/p for this? and what is the logic?
#include <stdio.h int main() { int x = -5, y = 8; x = x + y - (y = x); printf("%d", x * y); return 0; }what will be the o/p for this? and what is the logic?
Pradeep_Kumar
436
views
Pradeep_Kumar
asked
Jul 20, 2023
0
votes
1
answer
114
a sequential access file has a fixed size of 25 byte records. What is the logical location of the first byte of record 5?
Harsh007
1.0k
views
Harsh007
asked
Jul 19, 2023
Programming in C
programming
+
–
1
votes
1
answer
115
Arrays, Storage classes
Can an array store elements of different storage classes?
Can an array store elements of different storage classes?
Sparsh-NJ
377
views
Sparsh-NJ
asked
Jul 15, 2023
Programming in C
array
storage-classes-in-c
+
–
2
votes
2
answers
116
Functions and storage classes, Gate Wallah Practice Sheet,
I am getting (b) 5 ?? Can you please explain the_ int i_ in for loop and display() [MCQ] 44. Consider the following function: void display() { static int i; if(i<=printf("GATE24")) { i=i+2; display(); } } int main() { int i=0; ... ;3;i++) display(); return 0; } The number of times printf() executed is- (a) 6 (b) 5 (c) 7 (d) 9
I am getting (b) 5 ?? Can you please explain the_ int i_ in for loop and display()[MCQ] 44. Consider the following function: void display() { static int i; if(i<=printf("...
gagan55
583
views
gagan55
asked
Jul 15, 2023
Programming in C
programming-in-c
storage-classes-in-c
+
–
0
votes
1
answer
117
self-doubt Data structure Linked list. Inserting a node at the beginning of a linked list
How to Visualize this code ? #include<stdio.h> #include<stdlib.h> struct node{ int data; struct node *next; }; void addFirst(struct node **head,int val){ struct node *newNode =malloc(sizeof(struct node ... ); addFirst(&head,30); addFirst(&head,40); addFirst(&head,50); printList(head); }
How to Visualize this code ?#include<stdio.h #include<stdlib.h struct node{ int data; struct node *next; }; void addFirst(struct node head,int val){ struct node *newNode...
gagan55
946
views
gagan55
asked
Jul 13, 2023
DS
data-structures
linked-list
+
–
0
votes
1
answer
118
what is load factor
Gaurav Kadyan
178
views
Gaurav Kadyan
asked
Jul 13, 2023
DS
data-structures
+
–
1
votes
1
answer
119
made easy workbook
Anmol pratap singh
598
views
Anmol pratap singh
asked
Jul 8, 2023
DS
made-easy-booklet
array
+
–
0
votes
0
answers
120
ISRO2020-62
#include int main() { int x; char *ptr; x=622,100,101; printf("%d",(*(char *)&x)*(x%3)); return 0; } In this question what is the meaning of “ *(char *)&x “ ? please explain it.
#includeint main(){ int x;char *ptr;x=622,100,101;printf("%d",(*(char *)&x)*(x%3));return 0; }In this question what is the meaning of “ *(char *)&x “ ? please ...
Ray Tomlinson
881
views
Ray Tomlinson
asked
Jul 5, 2023
Programming in C
isro-2020
programming-in-c
pointers
programming
+
–
Page:
« prev
1
2
3
4
5
6
7
8
9
10
11
...
310
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register