Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Recent questions and answers in Programming in C
187
views
1
answers
2
votes
Gate Wallah DPP
Consider the following function:int arc(int i, int j){if(i<2) return j+2;else if(j<2) return arc(i-1, 1);else return arc(i-1, arc(i, j-2));}The value returned by arc(2, 6...
Bhaskar_Saini
187
views
Bhaskar_Saini
answered
May 12
Programming in C
programming-in-c
numerical-answers
+
–
121
views
1
answers
0
votes
Functions
Consider the following function:int arc(int i, int j){if(i<2) return j+2;else if(j<2) return arc(i-1, 1);else return arc(i-1, arc(i, j-2));}The value returned by arc(2, 6...
Prakash_017
121
views
Prakash_017
answered
May 12
Programming in C
functions
+
–
3.6k
views
3
answers
5
votes
GATE CSE 2024 | Set 2 | Question: 26
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-...
Cxdr
3.6k
views
Cxdr
answered
May 7
Programming in C
gatecse2024-set2
programming
programming-in-c
pointers
+
–
122
views
0
answers
0
votes
self doubt
let suppose address of first index of array is n and size of each block of array is u. then the index of second element is a+u.let suppose the array has m elements.what w...
srijankarak_123
122
views
srijankarak_123
asked
May 7
Programming in C
programming-in-c
array
+
–
53
views
0
answers
0
votes
i am not able to give test
arjun1947
53
views
arjun1947
asked
May 5
1.5k
views
1
answers
0
votes
UGC NET CSE | June 2010 | Part 2 | Question: 33
Consider the following left associative operators in decreasing order of precedence :- subtraction (highest precedence)* multiplication$ exponentiation (lowest precedence...
Vivek kadam
1.5k
views
Vivek kadam
answered
May 1
Programming in C
ugcnetcse-june2010-paper2
programming
operator-precedence
+
–
271
views
1
answers
1
votes
GO Classes 2024 | IIITH Mock Test 5 | Question: 46
In which of the following case(s) character array must end with null char?char c[] = "GATE";char c[] = {'2', '0', '2', '3'};char c[4] = "GATE";char c[16] = "2023";
anishsp
271
views
anishsp
answered
May 1
Programming in C
goclasses2024-iiith-mock-5
goclasses
programming
programming-in-c
array
multiple-selects
1-mark
+
–
208
views
1
answers
0
votes
C Programming - Arrays & Pointer (NAT)
#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...
kumaruk
208
views
kumaruk
answered
May 1
Programming in C
array
data-structures
programming-in-c
+
–
247
views
2
answers
2
votes
GO Classes 2024 | IIITH Mock Test 5 | Question: 16
What will be printed by following $\text{C}$ code?int a[7] = {0, 1, 2, 3, 4, 5, 6}; int *p = &a[3]; p += 2; *p += 2; printf("%d", *p++);$6$$7$$8$$9$
naval
247
views
naval
answered
Apr 30
Programming in C
goclasses2024-iiith-mock-5
goclasses
programming
programming-in-c
pointers
1-mark
+
–
238
views
2
answers
1
votes
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 abo...
Abha Gupta
238
views
Abha Gupta
answered
Apr 29
Programming in C
ace-test-series
+
–
2.8k
views
2
answers
7
votes
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/ar...
saini.tarun51
2.8k
views
saini.tarun51
answered
Apr 28
Programming in C
gatecse2024-set2
programming
programming-in-c
multiple-selects
output
+
–
2.6k
views
2
answers
2
votes
GATE CSE 2024 | Set 1 | Question: 38
Consider the following $\mathrm{C}$ function definition.int f (int x, int y){ for (int i=0 ; i<y ; i++ ) { x= x + x + y; } return x; }Which of the following stateme...
subhajit1998
2.6k
views
subhajit1998
answered
Apr 19
Programming in C
gatecse2024-set1
multiple-selects
programming
programming-in-c
+
–
248
views
0
answers
0
votes
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 li...
Debargha Mitra Roy
248
views
Debargha Mitra Roy
asked
Apr 12
Programming in C
programming-in-c
operator-precedence
boolean-algebra
+
–
122
views
1
answers
1
votes
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...
Sun Wukong
122
views
Sun Wukong
answered
Apr 12
212
views
2
answers
0
votes
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 5b. 1c. 5 4 3 2 1d. Error
Sun Wukong
212
views
Sun Wukong
answered
Apr 11
Programming in C
recursion
programming-in-c
programming
+
–
145
views
1
answers
1
votes
#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 c...
Sun Wukong
145
views
Sun Wukong
answered
Apr 9
Programming in C
recursion
functions
+
–
249
views
1
answers
0
votes
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 =a+1; p =a+2; ++*p; ...
C1h2a3i4t5
249
views
C1h2a3i4t5
answered
Apr 8
1.2k
views
3
answers
0
votes
Extern in C programming
int main(){extern int a = 20;printf("%d",a); }//why this gives error but followig code is not extern int a =20;int main(){printf("%d",a); } //why this happens that first ...
Abhishek_student
1.2k
views
Abhishek_student
answered
Apr 4
Programming in C
algorithms
programming-in-c
+
–
16.0k
views
4
answers
132
votes
GATE CSE 2014 Set 2 | Question: 11
Suppose $n$ and $p$ are unsigned int variables in a C program. We wish to set $p$ to $^nC_3$. If $n$ is large, which one of the following statements is most likely to set...
ayan2000
16.0k
views
ayan2000
answered
Mar 28
Programming in C
gatecse-2014-set2
programming
programming-in-c
normal
+
–
1.2k
views
4
answers
6
votes
GO Classes Weekly Quiz 2 | Programming in C | Propositional Logic | Question: 2
What will be output printed by the following program?#include<stdio.h main() { int c=4; switch(c) { c=c-1; case 4: printf("IITB ")...
geetaseshapallli
1.2k
views
geetaseshapallli
answered
Mar 26
Programming in C
goclasses_wq2
goclasses
programming
programming-in-c
output
1-mark
+
–
453
views
3
answers
2
votes
UPPCL AE 2018:34
What is the output of the following $\text{C}$ program?#include<stdio.h int main(void){ char s1[] = “Hello”; char s2[] = “World!”; s1 = s2; printf(“%s”,s1); }...
geetaseshapallli
453
views
geetaseshapallli
answered
Mar 26
Programming in C
uppcl2018
programming
programming-in-c
output
+
–
11.5k
views
4
answers
19
votes
GATE CSE 2023 | Question: 25
The integer value printed by the $\textsf{ANSI-C}$ program given below is _______________#include<stdio.h int funcp(){ static int x = 1; x++; return x; } int main(){ int ...
ritiksri8
11.5k
views
ritiksri8
answered
Mar 25
Programming in C
gatecse-2023
programming
programming-in-c
output
numerical-answers
1-mark
+
–
519
views
1
answers
0
votes
GATE CSE 1988 | Question: 8iii
Write a LISP function to compute the product of all the numbers in a list. Assume that the list contains only number.
cprdereddyy
519
views
cprdereddyy
answered
Mar 25
Programming in C
gate1988
descriptive
programming
lisp
out-of-gate-syllabus
+
–
189
views
0
answers
3
votes
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?
RahulVerma3
189
views
RahulVerma3
asked
Mar 22
Programming in C
programming-in-c
programming
+
–
30.6k
views
11
answers
40
votes
GATE CSE 2021 Set 2 | Question: 10
Consider the following $\text{ANSI C}$ program.#include <stdio.h int main() { int arr[4][5]; int i, j; for (i=0; i<4; i++) { for (j=0; j<5; j++) { arr[i...
Subham640
30.6k
views
Subham640
answered
Mar 18
Programming in C
gatecse-2021-set2
programming-in-c
array
output
1-mark
+
–
16.7k
views
8
answers
49
votes
GATE CSE 2015 Set 3 | Question: 7
Consider the following C program segment.# include <stdio.h int main() { char s1[7] = "1234", *p; p = s1 + 2; *p = '0'; printf("%s", s1); }What will be printed by the pro...
Subham640
16.7k
views
Subham640
answered
Mar 17
Programming in C
gatecse-2015-set3
programming
programming-in-c
normal
array
+
–
189
views
0
answers
0
votes
GATE 2024 CSE1
I have a question that can we use command line arguments without main function arguments?int main(int argc, char argv){}
RahulVerma3
189
views
RahulVerma3
asked
Mar 16
Programming in C
programming-in-c
usergate2024
+
–
242
views
1
answers
0
votes
Gate 2017 Set 1 minimum Comparisons
Consider an array A of size 31 consisting of 0's followed by number of 1's. In order to find the smallest index i such that A[i]=1 minimum number of comparisons required ...
teja1521
242
views
teja1521
answered
Mar 11
Programming in C
numerical-answers
algorithms
+
–
2.7k
views
2
answers
2
votes
let x be an array of integer which of the following can not be present in the LHS of an assignment statement
let x be an array of integer . which of the following can not be present in the left hand side of an assignment statementa)x b) x+i c) * (x+i) d) &x[i]
teja1521
2.7k
views
teja1521
answered
Mar 11
222
views
1
answers
1
votes
Array
Does C support fractional Indices?float x = some fraction;Is float a[x] valid declaration?
teja1521
222
views
teja1521
answered
Mar 8
Programming in C
array
programming-in-c
+
–
447
views
3
answers
2
votes
Made Easy Mock -1
how does the program is working..?answer – 8
teja1521
447
views
teja1521
answered
Mar 8
Programming in C
programming
numerical-answers
made-easy-test-series
+
–
459
views
3
answers
6
votes
GO Classes Test Series 2024 | Programming | Test 2 | Question: 21
What will be the output of the following program?#include<stdio.h int rec(int x, int y) { static int count = 0; if (x == 0) return count; count++; if (x y) rec(x - y, y)...
teja1521
459
views
teja1521
answered
Mar 8
Programming in C
goclasses2024-programming-2-weekly-quiz
goclasses
programming
programming-in-c
recursion
output
2-marks
+
–
3.5k
views
3
answers
2
votes
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') ...
shah___
3.5k
views
shah___
answered
Mar 6
Programming in C
gatecse2024-set1
programming
programming-in-c
output
+
–
150
views
1
answers
0
votes
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.1ii) 256.1.8.9iii)...
sanjeet24
150
views
sanjeet24
answered
Mar 5
6.1k
views
2
answers
2
votes
find the output
include <stdio.h int main() { int a[][3] = {1, 2, 3, 4, 5, 6}; int (*ptr)[3] = a; printf("%d %d ", (*ptr) , (*ptr) ); ++ptr; printf("%d %d\n", (*ptr) , (*ptr) ); return 0...
ritiksri8
6.1k
views
ritiksri8
answered
Mar 4
Programming in C
programming-in-c
+
–
310
views
1
answers
2
votes
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
AniMan_7
310
views
AniMan_7
answered
Feb 29
Programming in C
programming-in-c
+
–
4.5k
views
2
answers
5
votes
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; }...
AniMan_7
4.5k
views
AniMan_7
answered
Feb 28
Programming in C
gatecse2024-set2
programming
programming-in-c
functions
+
–
28.8k
views
13
answers
70
votes
GATE CSE 2017 Set 2 | Question: 55
Consider the following C program.#include<stdio.h #include<string.h int main() { char* c="GATECSIT2017"; char* p=c; printf("%d", (int)strlen(c+2[p]-6[p]-1)); return 0; }T...
B Bhatta
28.8k
views
B Bhatta
answered
Feb 28
Programming in C
gatecse-2017-set2
programming-in-c
numerical-answers
array
pointers
+
–
19.6k
views
4
answers
59
votes
GATE CSE 2014 Set 2 | Question: 40
Consider the following function.double f(double x){ if( abs(x*x - 3) < 0.01) return x; else return f(x/2 + 1.5/x); }Give a value $q$ (to $2$ decimals) such that $f(q)$ wi...
B Bhatta
19.6k
views
B Bhatta
answered
Feb 26
Programming in C
gatecse-2014-set2
programming
recursion
numerical-answers
normal
+
–
226
views
1
answers
0
votes
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.
꧁༒☬ĿọŗԀ 🆂🅷🅸🆅🅰☬༒꧂
226
views
꧁༒☬ĿọŗԀ 🆂🅷🅸🆅🅰☬༒꧂
answered
Feb 26
Programming in C
linked-list
data-structures
algorithms
+
–
To see more, click for all the
questions in this category
.
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register