Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Webpage for Programming:
Recent questions tagged programming
1
votes
1
answer
31
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
479
views
GO Classes
asked
Jan 21
Programming in C
goclasses2024-mockgate-12
goclasses
programming
programming-in-c
pointers
2-marks
+
–
4
votes
2
answers
32
GO Classes Test Series 2024 | Mock GATE | Test 11 | Question: 21
Consider the following two blocks of code, found in separate files: /* main.c */ int main() { int i=0; foo(); return 0; } /* foo.c */ int i=1; void foo() { printf( %d , i); } What will happen when you attempt to ... ? It will fail to compile. It will fail to link. It will print " $0$ ". It will print " $1$ ".
Consider the following two blocks of code, found in separate files:/* main.c */ int main() { int i=0; foo(); return 0; }/* foo.c */ int i=1; void foo() { printf(“%d”,...
GO Classes
922
views
GO Classes
asked
Jan 13
Programming in C
goclasses2024-mockgate-11
goclasses
programming
programming-in-c
recursion
1-mark
+
–
1
votes
1
answer
33
GO Classes Test Series 2024 | Mock GATE | Test 11 | Question: 22
What will the following print: int a, b, c, *d; a = 0; b = 1 ; c = 2 ; d = & a; (*d) += b+c; d = & b; (*d) += a+b+c ; printf("a= %i b=%i\n", a, b); $a=0, b=3$ $a=3, b=3$ $a=3, b=4$ $a=3, b=7$
What will the following print:int a, b, c, *d; a = 0; b = 1 ; c = 2 ; d = & a; (*d) += b+c; d = & b; (*d) += a+b+c ; printf("a= %i b=%i\n", a, b);$a=0, b=3$$a=3, b=3$$a=3...
GO Classes
412
views
GO Classes
asked
Jan 13
Programming in C
goclasses2024-mockgate-11
goclasses
programming
programming-in-c
pointers
1-mark
+
–
6
votes
1
answer
34
GO Classes Test Series 2024 | Mock GATE | Test 11 | Question: 23
What will be the output on the execution of the following code segment? main() { unsigned num1=-1; signed num2=1; if(num1 < num2) printf("less"); else if(num1>num2) printf("greater"); else if(num1==num2) printf("equal"); } greater less equal error
What will be the output on the execution of the following code segment?main() { unsigned num1=-1; signed num2=1; if(num1 < num2) printf("less"); else if(num1>num2) printf...
GO Classes
511
views
GO Classes
asked
Jan 13
Programming in C
goclasses2024-mockgate-11
goclasses
programming
programming-in-c
output
1-mark
+
–
3
votes
3
answers
35
GO Classes Test Series 2024 | Mock GATE | Test 11 | Question: 47
What will be the output of the following program? #include<stdio.h> void swap(char **s1, char **s2){ char *tmp; tmp=*s1; *s1=*s2; *s2=tmp; } int main() { char *str[3]= {"orange", "apple", ... %s %s", strs[0], strs[1], strs[2]); } pear apple orange apple pear orange orange apple pear apple orange pea
What will be the output of the following program?#include<stdio.h void swap(char s1, char s2){ char *tmp; tmp=*s1; *s1=*s2; *s2=tmp; } int main() { char *str[3]= {"oran...
GO Classes
364
views
GO Classes
asked
Jan 13
Programming in C
goclasses2024-mockgate-11
goclasses
programming
programming-in-c
array
array-of-pointers
2-marks
+
–
6
votes
1
answer
36
GO Classes Test Series 2024 | Mock GATE | Test 11 | Question: 48
Consider the following pair of mutually recursive functions. What does $g(g(2))$ evaluate to? int f(int n){ if (n==0) return 0; return f(n-1)+g(n-1); } int g(int n){ if (n==0) return 1; return g(n-1) + f(n); }
Consider the following pair of mutually recursive functions. What does $g(g(2))$ evaluate to?int f(int n){ if (n==0) return 0; return f(n-1)+g(n-1); } int g(int n){ if (n...
GO Classes
425
views
GO Classes
asked
Jan 13
Programming in C
goclasses2024-mockgate-11
goclasses
numerical-answers
programming
programming-in-c
recursion
2-marks
+
–
0
votes
1
answer
37
Made easy Test series
Can you please explain the whole working of the code
Can you please explain the whole working of the code
Rohit Chakraborty
119
views
Rohit Chakraborty
asked
Jan 11
Programming in C
made-easy-test-series
programming
+
–
2
votes
1
answer
38
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
+
–
Page:
« prev
1
2
3
4
5
6
7
...
32
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register