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 in C
0
votes
0
answers
1
i am not able to give test
arjun1947
10
views
arjun1947
asked
23 hours
ago
0
votes
0
answers
2
university assignment question
The array-based stack throws an exception when the array's capacity has been reached. Consider the following alternative : create a larger array, using the resize method. The cost of a resize that makes the array larger is proportional to the new size. 1. Suppose we ... and 2 for queues.Note that after the resize, elements may Solutions = O(N^2) O(N) O(N^2) O(N)
The array-based stack throws an exception when the array’s capacity has been reached. Consider the following alternative : create a larger array, using the resize metho...
꧁༒☬ĿọŗԀ 🆂🅷🅸🆅🅰☬༒꧂
32
views
꧁༒☬ĿọŗԀ 🆂🅷🅸🆅🅰☬༒꧂
asked
1 day
ago
1
votes
2
answers
3
Test series question of ace academy
#include<stdio.h> #define ADD(a,b)(a+b) #define SQUARE(x)(x*x) int main() { int x=2; int y=3; int z = ADD(SQUARE(x++),y); printf("%d\n",z); return 0; } What is the output of the above code snippet?
#include<stdio.h>#define ADD(a,b)(a+b)#define SQUARE(x)(x*x)int main(){int x=2;int y=3;int z = ADD(SQUARE(x++),y);printf("%d\n",z);return 0;}What is the output of the abo...
Ayush_Pal
144
views
Ayush_Pal
asked
Apr 26
Programming in C
ace-test-series
+
–
0
votes
2
answers
4
C Programming - Arrays & Pointer (NAT)
#include <stdio.h> int main() { int a[3][2] = {1, 3, 5, 7, 9, 11}; int *ptr = a[0]; ptr += sizeof(int); printf("%d", *ptr); return 0; } (Assume size of int to be $2$ bytes.) The output is __________.
#include <stdio.h int main() { int a[3] = {1, 3, 5, 7, 9, 11}; int *ptr = a[0]; ptr += sizeof(int); printf("%d", *ptr); return 0; }(Assume size of int to be $2$ bytes.)T...
Debargha Mitra Roy
134
views
Debargha Mitra Roy
asked
Apr 16
Programming in C
array
data-structures
programming-in-c
+
–
0
votes
0
answers
5
Bitwise Operator - C Programming
Problem Statement: Class teacher to IX-C wants to store whether a particular student has passed in exams. The class has a strength of $32$ students. Their roll numbers lie in the range: $[1, 32]$. The teacher used bits of an integer to store ... Bitwise OR (|) operator and count number of set bits d. Apply Bitwise AND (&) operator and count number of set bits
Problem Statement: Class teacher to IX-C wants to store whether a particular student has passed in exams. The class has a strength of $32$ students. Their roll numbers li...
Debargha Mitra Roy
179
views
Debargha Mitra Roy
asked
Apr 12
Programming in C
programming-in-c
operator-precedence
boolean-algebra
+
–
0
votes
1
answer
6
Consider the following program: #include <stdio.h> int main(){ int a=2, i; static int b=a++; for(i=0;i<a+b;i++) printf("GATE Wallah"); return 0; } Which of the following is/are CORRECT? (a) GATE Wallah is printed 3 times. (b) GATE Wallah is printed 4 times. (c) GATE Wallah is printed 5 times. (d) Compilation Error.
Consider the following program: #include <stdio.h int main(){ int a=2, i; static int b=a++; for(i=0;i<a+b;i++) printf("GATE Wallah"); return 0; }Which of the following is...
Pradeep kori 73
89
views
Pradeep kori 73
asked
Apr 11
0
votes
2
answers
7
C Programming - Recursion
What is the output of the below code? #include <stdio.h> void main() { static int var = 5; printf("%d ", var--); if (var) main(); } a. 1 2 3 4 5 b. 1 c. 5 4 3 2 1 d. Error
What is the output of the below code?#include <stdio.h void main() { static int var = 5; printf("%d ", var ); if (var) main(); }a. 1 2 3 4 5b. 1c. 5 4 3 2 1d. Error
Debargha Mitra Roy
151
views
Debargha Mitra Roy
asked
Apr 10
Programming in C
recursion
programming-in-c
programming
+
–
1
votes
1
answer
8
#Recursivefunctions
int bar(int val){ int x=0; while(val > 0){ x=x+bar(val -1); } return val; } Q: For bar(3) this function is supposed to be stuck in an infinite loop but I do not know how please can someone explain?
int bar(int val){int x=0;while(val 0){x=x+bar(val -1);}return val;}Q: For bar(3) this function is supposed to be stuck in an infinite loop but I do not know how please c...
sumitkumarsethi
107
views
sumitkumarsethi
asked
Apr 8
Programming in C
recursion
functions
+
–
3
votes
0
answers
9
GATE CSE SET-1 2024
My question is that can we use command line arguments without use of main function's parameters argc and *argv?
My question is that can we use command line arguments without use of main function's parameters argc and *argv?
RahulVerma3
166
views
RahulVerma3
asked
Mar 22
Programming in C
programming-in-c
programming
+
–
0
votes
0
answers
10
GATE 2024 CSE1
I have a question that can we use command line arguments without main function arguments? int main(int argc, char **argv){ }
I have a question that can we use command line arguments without main function arguments?int main(int argc, char argv){}
RahulVerma3
158
views
RahulVerma3
asked
Mar 16
Programming in C
programming-in-c
usergate2024
+
–
0
votes
1
answer
11
class question self doubt
#include<stdio.h> #include<conio.h> int main(){ int a[][3]={ {4,14,24},{5,15,25},{6,16,26}}; int *p[3]; int **ptr=p; p[0]=a; p[1]=a+1; p[2]=a+2; ++*p; ++p[0]; ++**ptr; ++*p[0]; ++ptr; ++*ptr; --*p[1]; --*ptr; ++ptr; --p[ ... ("\n%d,%d,%d",a[0][2],a[1][1],a[2][0]); printf("\n%d,%d,%d",*p[0],*p[1],*p[2]); } what is the output of above program
#include<stdio.h>#include<conio.h>int main(){ int a[][3]={ {4,14,24},{5,15,25},{6,16,26}}; int *p[3]; int ptr=p; p[0]=a; p =a+1; p =a+2; ++*p; ...
Emankashyap
199
views
Emankashyap
asked
Mar 1
1
votes
1
answer
12
c programming
#include <stdio.h> int main() { int i = -1; int x = (unsigned char)i; printf("%d", x); return 0; } output is 255 , but please explain how
#include <stdio.h int main() { int i = -1; int x = (unsigned char)i; printf("%d", x); return 0; }output is 255 , but please explain how
SSR17
282
views
SSR17
asked
Feb 29
Programming in C
programming-in-c
+
–
1
votes
0
answers
13
I have purchased the IIIT Hyderabad 2024 test series but i can't find the test series anywhere
Khushbu Chaudhary
109
views
Khushbu Chaudhary
asked
Feb 25
0
votes
1
answer
14
Linked List
How can we find the highest element in a singly linked list in O(1)? We are free to use any extra space.
How can we find the highest element in a singly linked list in O(1)? We are free to use any extra space.
Mrityudoot
195
views
Mrityudoot
asked
Feb 25
Programming in C
linked-list
data-structures
algorithms
+
–
0
votes
1
answer
15
s.balaguruswami
Find the error of the following IP addresses. If the IP is valid, check its Class and determine whether the address is Unicast or Multicast. i) 237.15.2.1 ii) 256.1.8.9 iii) 114.34.2.8 iv) 255.254.0.1 v) 8.8.8.8
Find the error of the following IP addresses. If the IP is valid, check its Class and determine whether the address is Unicast or Multicast.i) 237.15.2.1ii) 256.1.8.9iii)...
Sheikh Rafi
124
views
Sheikh Rafi
asked
Feb 24
4
votes
2
answers
16
GATE CSE 2024 | Set 2 | Question: 3
Consider the following $\text{C}$ program. Assume parameters to a function are evaluated from right to left. #include <stdio.h> int g( int p) { printf("%d", p); return p; } int h(i nt q) { printf("%d", q) ... one of the following options is the CORRECT output of the above $\text{C}$ program? $20101020$ $10202010$ $20102010$ $10201020$
Consider the following $\text{C}$ program. Assume parameters to a function are evaluated from right to left.#include <stdio.h int g( int p) { printf("%d", p); return p; }...
Arjun
4.0k
views
Arjun
asked
Feb 16
Programming in C
gatecse2024-set2
programming
programming-in-c
functions
+
–
5
votes
2
answers
17
GATE CSE 2024 | Set 2 | Question: 23
Consider the following $\mathrm{C}$ function definition. int f X(char * a) { char * b = a; while (*b) b ++; return b - a; } Which of the following statements is/are TRUE? The function call $\text{f X("a b c d''}$) will ... ${ }^{*} \mathrm{C}=$ "abcd" in main (), the function call $\mathrm{fX}(\mathrm{c})$ will always return a value
Consider the following $\mathrm{C}$ function definition.int f X(char * a) { char * b = a; while (*b) b ++; return b - a; }Which of the following statements is/ar...
Arjun
2.5k
views
Arjun
asked
Feb 16
Programming in C
gatecse2024-set2
programming
programming-in-c
multiple-selects
output
+
–
2
votes
2
answers
18
GATE CSE 2024 | Set 2 | Question: 26
What is the output of the following $\text{C}$ program? #include <stdio.h> int main() { double a[2]=20.0,25.0,* p,* q; p=a ; q=p+1 ; printf("%d,%d", (int) (q-p),( int)(* q- * p)); return 0; $4,8$ $1,5$ $8,5$ $1,8$
What is the output of the following $\text{C}$ program?#include <stdio.h int main() { double a =20.0,25.0,* p,* q; p=a ; q=p+1 ; printf("%d,%d", (int) (q-...
Arjun
3.1k
views
Arjun
asked
Feb 16
Programming in C
gatecse2024-set2
programming
programming-in-c
pointers
+
–
3
votes
3
answers
19
GATE CSE 2024 | Set 1 | Question: 8
Consider the following $\mathrm{C}$ program: #include <stdio.h> int main() { int a=6; int b = 0; while (a<10) { a = a / 12+1 ; a += b ;} printf ("%d", a); return 0 ; } Which one of the following ... The program prints $9$ as output The program prints $10$ as output The program gets stuck in an infinite loop The program prints $6$ as output
Consider the following $\mathrm{C}$ program:#include <stdio.h int main() { int a=6; int b = 0; while (a<10) { a = a / 12+1 ; a += b ;} printf ("%d", a); return 0 ; }Whi...
Arjun
6.2k
views
Arjun
asked
Feb 16
Programming in C
gatecse2024-set1
programming
programming-in-c
output
+
–
1
votes
3
answers
20
GATE CSE 2024 | Set 1 | Question: 9
Consider the following $\mathrm{C}$ program: #include <stdio.h> void fX (); int main(){ fX(); return 0 }; void fX () { char a; if ((a=g e t c h a r()) ! = '\n') fX(); if (a ! ... program will not terminate The program will terminate with no output The program will terminate with $4321$ as output The program will terminate with $1234$ as output
Consider the following $\mathrm{C}$ program:#include <stdio.h void fX (); int main(){ fX(); return 0 };void fX () { char a; if ((a=g e t c h a r()) ! = '\n') ...
Arjun
3.2k
views
Arjun
asked
Feb 16
Programming in C
gatecse2024-set1
programming
programming-in-c
output
+
–
Page:
1
2
3
4
5
6
...
206
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register