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 in C
2
votes
1
answer
61
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
299
views
SSR17
asked
Feb 29
Programming in C
programming-in-c
+
–
6
votes
1
answer
62
GO Classes Test Series 2024 | Mock GATE | Test 12 | Question: 26
What will be the output of the following C program? #include<stdio.h> void main() { int i=6; for(--i; --i; i--) { printf("%d",i); } } $42$ $31$ Infinite loop None of these
What will be the output of the following C program?#include<stdio.h void main() { int i=6; for( i; i; i ) { printf("%d",i); } }$42$$31$Infinite loopNone of these
GO Classes
510
views
GO Classes
asked
Jan 21
Programming in C
goclasses2024-mockgate-12
goclasses
programming
programming-in-c
output
2-marks
+
–
6
votes
2
answers
63
GO Classes Test Series 2024 | Mock GATE | Test 12 | Question: 13
What will be the output of following program ? #include <stdio.h> int thefunction(int a) { static int b = 0; b++; a = a + b; return a; } int main() { int b = 0; int i; for (i = 1; i <= 3; i++) { b = b + thefunction(i); } printf("%d\n", b); return 0; }
What will be the output of following program ?#include <stdio.h int thefunction(int a) { static int b = 0; b++; a = a + b; return a; } int main() { int b = 0; int i; for ...
GO Classes
613
views
GO Classes
asked
Jan 21
Programming in C
goclasses2024-mockgate-12
goclasses
numerical-answers
programming
programming-in-c
storage-classes-in-c
1-mark
+
–
5
votes
1
answer
64
GO Classes Test Series 2024 | Mock GATE | Test 13 | Question: 18
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 "); break; default: printf("IISc "); case 3: printf("IITM "); case ... ;IITD"); } } $\text{IITB IITM}$ $\text{IITB IISc IITM}$ $\text{IITB}$ $\text{IITB IITM IITD}$
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 ")...
GO Classes
438
views
GO Classes
asked
Jan 28
Programming in C
goclasses2024-mockgate-13
goclasses
programming
programming-in-c
output
1-mark
+
–
6
votes
1
answer
65
GO Classes Test Series 2024 | Mock GATE | Test 12 | Question: 14
What will be the output of the following program? main() { int a[2][2] = { {1,2},{3,4} }; int(*p)[2][2]; p = &a; printf("%d", (*p)[0][0]); } $1$ $3$ $4$ None of these
What will be the output of the following program?main() { int a = { {1,2},{3,4} }; int(*p) ; p = &a; printf("%d", (*p)[0][0]); }$1$$3$$4$None of these
GO Classes
477
views
GO Classes
asked
Jan 21
Programming in C
goclasses2024-mockgate-12
goclasses
programming
programming-in-c
array
output
1-mark
+
–
1
votes
1
answer
66
Array
Does C support fractional Indices? float x = some fraction; Is float a[x] valid declaration?
Does C support fractional Indices?float x = some fraction;Is float a[x] valid declaration?
Mrityudoot
209
views
Mrityudoot
asked
Feb 2
Programming in C
array
programming-in-c
+
–
4
votes
1
answer
67
GO Classes Test Series 2024 | Mock GATE | Test 14 | Question: 43
What will be the output of the following C program? #include <stdio.h> void Mickey(int**, int, int); void Mouse(int, int*); int main() { int a = 2, b = 3, c = 4; int *points = &a; Mickey(&points, b, c); printf("%d", ... x; *p = **points+1; Mouse(z, p); return; } void Mouse(int z, int *p) { *p = *p+1; return; }
What will be the output of the following C program?#include <stdio.h>void Mickey(int , int, int);void Mouse(int, int*);int main(){ int a = 2, b = 3, c = 4; int *poi...
GO Classes
478
views
GO Classes
asked
Feb 5
Programming in C
goclasses2024-mockgate-14
numerical-answers
programming
programming-in-c
functions
2-marks
+
–
0
votes
0
answers
68
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
174
views
RahulVerma3
asked
Mar 16
Programming in C
programming-in-c
usergate2024
+
–
0
votes
1
answer
69
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
138
views
Sheikh Rafi
asked
Feb 24
4
votes
0
answers
70
GO Classes Test Series 2024 | Mock GATE | Test 13 | Question: 19
What will be the output of the following program? #include <stdio.h> int main() { int a[2][2] = { {1, 2}, {3, 4} }; int (*p)[2][2]; p = &a; printf("%d", (*p)[0][1]); return 0; } $1$ $2$ $3$ $4$
What will be the output of the following program?#include <stdio.h int main() { int a = { {1, 2}, {3, 4} }; int (*p) ; p = &a; printf("%d", (*p)[0] ); return 0; }$1$$2...
GO Classes
352
views
GO Classes
asked
Jan 28
Programming in C
goclasses2024-mockgate-13
goclasses
programming
programming-in-c
array-of-pointers
1-mark
+
–
4
votes
1
answer
71
GO Classes Test Series 2024 | Mock GATE | Test 14 | Question: 54
Consider the following pseudocode procedure. Which of the following best describes procedure mystery? It returns a list of numbers from 1 to $n$. It prints every third number from 1 to $n$. It returns the sum of the numbers from 1 to $\mathrm{n}$. It returns the sum of the multiples of 3 from 1 to $n$.
Consider the following pseudocode procedure.Which of the following best describes procedure mystery?It returns a list of numbers from 1 to $n$.It prints every third numbe...
GO Classes
273
views
GO Classes
asked
Feb 5
Programming in C
goclasses2024-mockgate-14
programming
programming-in-c
functions
2-marks
+
–
3
votes
1
answer
72
GO Classes Test Series 2024 | Mock GATE | Test 13 | Question: 47
#include<stdio.h> #include<string.h> char upstr[50]; void putStar (int n,char str[]){ upstr[n] = str[n]; if(n == strlen(str)) return; else upstr[n+1] = '*'; putStar(n+1,str); } int main() { char str[] = " ... , upstr); } What will be the output of the given program? h*e*l*l*o h*e*l*l*o* h*e*l*l* hello
#include<stdio.h #include<string.h char upstr[50]; void putStar (int n,char str[]){ upstr[n] = str[n]; if(n == strlen(str)) return; else upstr[n+1] = '*'; putStar(n+1,str...
GO Classes
364
views
GO Classes
asked
Jan 28
Programming in C
goclasses2024-mockgate-13
goclasses
programming
programming-in-c
array
2-marks
+
–
13
votes
8
answers
73
ISRO2015-69
If n has 3, then the statement a[++n]=n++; assigns 3 to a[5] assigns 4 to a[5] assigns 4 to a[4] what is assigned is compiler dependent
If n has 3, then the statement a[++n]=n++;assigns 3 to a[5]assigns 4 to a[5]assigns 4 to a[4]what is assigned is compiler dependent
milankamilya
8.7k
views
milankamilya
asked
Jun 14, 2016
Programming in C
isro2015
programming-in-c
non-gate
undefined-behaviour
+
–
1
votes
0
answers
74
I have purchased the IIIT Hyderabad 2024 test series but i can't find the test series anywhere
Khushbu Chaudhary
114
views
Khushbu Chaudhary
asked
Feb 25
0
votes
1
answer
75
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
207
views
Mrityudoot
asked
Feb 25
Programming in C
linked-list
data-structures
algorithms
+
–
1
votes
1
answer
76
GO Classes Test Series 2024 | Mock GATE | Test 12 | Question: 27
Consider the following C program:- #include <stdio.h> void ubswap(int **a, int **b) { int* temp = *a; *a = *b; *b = temp; } int main() { int x = 1, y = 9; int* u = &x; int* v = &y; int** a = &u; int** b ... $\text{ return 0 }?$ $x$ and $y$ $u$ and $v$ $a$ and $b$ None of the above
Consider the following C program:-#include <stdio.h void ubswap(int a, int b) { int* temp = *a; *a = *b; *b = temp; } int main() { int x = 1, y = 9; int* u = &x; int* v...
GO Classes
533
views
GO Classes
asked
Jan 21
Programming in C
goclasses2024-mockgate-12
goclasses
programming
programming-in-c
pointers
2-marks
+
–
51
votes
4
answers
77
GATE CSE 2000 | Question: 1.17, ISRO2015-79
Consider the following C declaration: struct { short x[5]; union { float y; long z; } u; )t; Assume that the objects of the type short, float and long occupy $2$ bytes, $4$ bytes and $8$ bytes, respectively. The memory requirement for variable $t$, ignoring alignment consideration, is: $22$ bytes $14$ bytes $18$ bytes $10$ bytes
Consider the following C declaration:struct { short x[5]; union { float y; long z; } u; )t;Assume that the objects of the type short, float and long occupy $2$ bytes, $4$...
Kathleen
21.0k
views
Kathleen
asked
Sep 14, 2014
Programming in C
gatecse-2000
programming
programming-in-c
easy
isro2015
union
+
–
52
votes
3
answers
78
GATE CSE 2000 | Question: 1.12
The most appropriate matching for the following pairs ... $X - 3 \ \ Y - 2 \ \ Z - 1$ $X - 3 \ \ Y - 1 \ \ Z - 2$
The most appropriate matching for the following pairs$$\begin{array}{|ll|ll|}\hline X: & \text{m = malloc(5); m = NULL;} & 1: & \text{using dangling pointers} \\\hline Y...
Kathleen
12.1k
views
Kathleen
asked
Sep 14, 2014
Programming in C
gatecse-2000
programming
programming-in-c
easy
match-the-following
pointers
+
–
1
votes
1
answer
79
Array, Memory Allocation
In what cases does an uninitialized array have values = 0 and for which cases does it have values = garbage values. How to differentiate?
In what cases does an uninitialized array have values = 0 and for which cases does it have values = garbage values. How to differentiate?
Mrityudoot
327
views
Mrityudoot
asked
Feb 2
Programming in C
memory-management
programming-in-c
array
+
–
2
votes
1
answer
80
GO Classes Test Series 2024 | Mock GATE | Test 12 | Question: 12
Consider the following two declarations for $\textsf{arr1}$ and $\textsf{arr2}:$ int arr1[2][3]; int r1[3]; int r2[3]; int * arr2[2] = {r1, r2}; Assume that the size of the integer is $4$ Bytes and the ... $\operatorname{sizeof}(\operatorname{arr}1)=48$ bytes and sizeof $(\operatorname{arr}2)=32$ bytes
Consider the following two declarations for $\textsf{arr1}$ and $\textsf{arr2}:$int arr1 [3]; int r1[3]; int r2[3]; int * arr2 = {r1, r2};Assume that the size of the int...
GO Classes
459
views
GO Classes
asked
Jan 21
Programming in C
goclasses2024-mockgate-12
goclasses
programming
programming-in-c
array-of-pointers
1-mark
+
–
Page:
« prev
1
2
3
4
5
6
7
8
9
...
206
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register