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
0
votes
1
answer
91
made easy test series
Suppose A is a 12 by 9 incidence matrix from a connected (but unknown) graph with 9 nodes and 12 edges. The diagonal entries of $A^{T}.A$ give the number of edges into each node. Then, what is the sum of those diagonal entries ________.
Suppose A is a 12 by 9 incidence matrix from a connected (but unknown) graph with 9 nodes and 12 edges. The diagonal entries of $A^{T}.A$give the number of edges into eac...
jugnu1337
352
views
jugnu1337
asked
Oct 22, 2023
Programming in C
graph-theory
+
–
0
votes
1
answer
92
Made easy
What is the correct option for the blanks so that the program runs in the correct manner? I was getting the answer B
What is the correct option for the blanks so that the program runs in the correct manner?I was getting the answer B
Rohit Chakraborty
491
views
Rohit Chakraborty
asked
Oct 6, 2023
Programming in C
made-easy-test-series
programming-in-c
2-marks
+
–
0
votes
1
answer
93
ace book
its output is 6??how?? // Online C++ compiler to run C++ program online #include <iostream> using namespace std; int main() { // Write int a=-3; a=-a-a+!a; cout<<a; return 0; }
its output is 6??how?? // Online C++ compiler to run C++ program online#include <iostream>using namespace std;int main() { // Write int a=-3; a=-a-a+!a; cout<...
Lifesuraj
238
views
Lifesuraj
asked
Oct 6, 2023
Programming in C
ace-booklet
+
–
2
votes
1
answer
94
MADE EASY test series
What will be returned after executing this code? Why the answer is -1?
What will be returned after executing this code? Why the answer is -1?
Rohit Chakraborty
314
views
Rohit Chakraborty
asked
Oct 5, 2023
Programming in C
programming
made-easy-test-series
+
–
0
votes
1
answer
95
programming
Consider the following C program. #include<stdio.h> #include<math.h> int foo(void) { return pow(2, 5); } int main() { static int s = foo(); printf("i = %d", s++); return 0; } Which of the following is TRUE? 1.Program will print 32. 2.Program will print 33. 3.Program will print 0. 4.Program gives a compilation error. ans is 4 bt how?
Consider the following C program.#include<stdio.h>#include<math.h>int foo(void){ return pow(2, 5);}int main(){ static int s = foo(); printf("i = %d",...
24aaaa23
389
views
24aaaa23
asked
Oct 3, 2023
Programming in C
programming-in-c
+
–
0
votes
1
answer
96
data structure
Consider a lower triangular matrix stored in row major order as p[-25 - - + 749][-25 - - - + 749] with base address = 6800, size of each element = 6 byte. Find the value at location p[658][596]?
Consider a lower triangular matrix stored in row major order as p[-25 - - + 749][-25 - - - + 749] with base address = 6800, size of each element = 6 byte. Find the value ...
deepak_8404
287
views
deepak_8404
asked
Oct 1, 2023
Programming in C
data-structures
algorithms
made-easy-test-series
+
–
1
votes
1
answer
97
Macro in c
#include<stdio.h> #define fun1(a,b) a>b?b:a #define fun2(a,b); {temp = a;a=b;b = temp;} int main() { int a = 3,b= 5,temp; if((3+fun1(a,b))>b) fun2(a,b); printf("%d%d",a,b); return 0; } Hello everyone. According to my dry run, the output of the above program should be 35 but it came as 53 on executing. Can you please explain? Thanks in advance.
#include<stdio.h>#define fun1(a,b) a>b?b:a#define fun2(a,b); {temp = a;a=b;b = temp;}int main(){int a = 3,b= 5,temp;if((3+fun1(a,b))>b) fun2(a,b);printf("%d%d",a,b...
Mrinal4565
296
views
Mrinal4565
asked
Sep 27, 2023
0
votes
2
answers
98
Self Doubt
The Total Combinations Possible of Min heap with 8 Distinct elements are ?
The Total Combinations Possible of Min heap with 8 Distinct elements are ?
viral8702
285
views
viral8702
asked
Sep 21, 2023
Programming in C
binary-heap
combinatory
data
data-structures
+
–
0
votes
1
answer
99
Binary Search Tree
when searching for the key 60 in a binary search tree containing nodes: 10,20,40,50,70,80,90 are traversed, not nessesarily in this same order. How many different orders are possible in which these keys can occur on the search path from the root node to the node containing key:60 ??
when searching for the key 60 in a binary search tree containing nodes: 10,20,40,50,70,80,90 are traversed, not nessesarily in this same order.How many different orders a...
rupamsardar
313
views
rupamsardar
asked
Sep 17, 2023
Programming in C
data-structures
binary-search-tree
+
–
1
votes
1
answer
100
Self doubt
#include <stdio.h> void SSort(int [], int); void swap(int *,int*); int main() { int arr[] = {5,4,3,2,1,0}; int n = sizeof(arr)/sizeof(arr[0]); SSort(arr,n); for(int i = 0; i < n; i++) { printf("%d\t", arr[i]); } return 0; } void SSort( ... = *x; *x = *y; *y = tmp; } This is a selection sort algorithm. But the output of the algo is: 0 0 0 0 0 0. Where is the problem ?
#include <stdio.h>void SSort(int [], int);void swap(int *,int*);int main() { int arr[] = {5,4,3,2,1,0}; int n = sizeof(arr)/sizeof(arr[0]); SSort(arr,n); for(...
Gopal6854
336
views
Gopal6854
asked
Sep 13, 2023
DS
sorting
self-doubt
algorithms
+
–
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
935
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
484
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
248
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
585
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
705
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
673
views
arpit.bagri
asked
Jul 26, 2023
Programming in C
programming-in-c
+
–
Page:
« prev
1
2
3
4
5
6
7
8
9
10
...
310
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register