Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Recent questions tagged programming-in-c
1
votes
1
answer
601
Output of following program(Self Doubt)
#include <stdio.h> main (){ unsigned x = -10; int X = 20; if (X > x) printf ("Hello"); else{ printf ("%d",x); printf ("Jello"); } }
#include <stdio.h>main (){unsigned x = -10;int X = 20;if (X x) printf ("Hello");else{ printf ("%d",x); printf ("Jello"); }}
Na462
1.4k
views
Na462
asked
Jan 8, 2019
Programming in C
programming-in-c
output
pointers
+
–
0
votes
0
answers
602
What is the output of below program
#include<stdio.h> void main(){ int p=-8; int i= (p++,++p); printf("%d\n",i); }
#include<stdio.h>void main(){int p=-8;int i= (p++,++p);printf("%d\n",i);}
aimhigh
1.3k
views
aimhigh
asked
Jan 8, 2019
Programming in C
programming-in-c
output
+
–
0
votes
0
answers
603
Ace 2019
what does putchar(x&m) does in the question?
what does putchar(x&m) does in the question?
balchandar reddy san
452
views
balchandar reddy san
asked
Jan 5, 2019
Programming in C
usergate2019
usermod
programming-in-c
+
–
0
votes
1
answer
604
UPPCL AE 2018:75
What is the output of the following $\text{C}$ program? #include<stdio.h> int main(void) { struct bitfields { int bits_1 : 2; int bits_2 : 4; int bits_3 : 4; int bits_4 : 3; } bit = {2, 3, 8, 7}; printf(“%d %d %d %d”, bit.bits_1, bit.bits_2, bit.bits_3, bit.bits_4 ); } $\text{-}2 \; 3 \; \text{-}8 \; \text{-}1 $ $2 \; 4 \; 4 \; 3 $ $0 \; 0 \; 0 \; 0 $ $2 \; 3 \; 8 \; 7 $
What is the output of the following $\text{C}$ program?#include<stdio.h int main(void) { struct bitfields { int bits_1 : 2; int bits_2 : 4; int bits_3 : 4; int bits_4 : ...
admin
340
views
admin
asked
Jan 5, 2019
Programming in C
uppcl2018
programming
programming-in-c
output
+
–
0
votes
0
answers
605
UPPCL AE 2018:59
Consider the following $\text{C}$ program. #include<stdio.h> #define XOR(a, b) (a) ^ (b) void func (int *a, int *b) { *a = XOR (*b, *a); *b = XOR (*a, *b); *a = XOR (*b, *a); } main() { int a = 10, b = 20; func (&a , &b); printf(“%d %d \n”,a,b); } What will be the output of the program? $20 \; 10$ $20 \; 20$ $10 \; 10$ $10 \; 20$
Consider the following $\text{C}$ program.#include<stdio.h #define XOR(a, b) (a) ^ (b) void func (int *a, int *b) { *a = XOR (*b, *a); *b = XOR (*a, *b); *a = XOR (*b, *a...
admin
251
views
admin
asked
Jan 5, 2019
Programming in C
uppcl2018
programming
programming-in-c
output
+
–
2
votes
3
answers
606
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); } “World!” “HelloWorld!” “Compilation error” “Hello”
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); }...
admin
415
views
admin
asked
Jan 5, 2019
Programming in C
uppcl2018
programming
programming-in-c
output
+
–
0
votes
0
answers
607
UPPCL AE 2018:25
Consider the following code. #include<stdio.h> int main(int argc, char **argv) { printf(“%s\n”, argv[0]); return 0; } If the program is compiled to an executable file named simple, what will be the output of the program when executed with the following command: ./simple hello world World Hello Segmentation fault ./simple
Consider the following code.#include<stdio.h int main(int argc, char argv) { printf(“%s\n”, argv[0]); return 0; }If the program is compiled to an executable fi...
admin
239
views
admin
asked
Jan 5, 2019
Programming in C
uppcl2018
programming
programming-in-c
output
+
–
0
votes
2
answers
608
MadeEasy Test Series: Programming & DS - Programming In C
#include<stdio.h> int main() { code(4); return 0; } int code(int m) { if(m>0){ int i=1; for(;i<3;i++){ code(m-i); code(m-i-1); printf("MadeEasy"); } } return 0; } the number of times made easy will be printed? plz explain in detail
#include<stdio.h>int main(){ code(4); return 0;}int code(int m){ if(m>0){ int i=1; for(;i<3;i++){ code(m-i); code(m-i-1); ...
suneetha
403
views
suneetha
asked
Jan 5, 2019
Programming in C
made-easy-test-series
programming-in-c
+
–
0
votes
2
answers
609
#c lang
void main() { int i=6; for(--i; --i; i--) { printf(“%d”,i); } }
void main() { int i=6; for( i; i; i ) { printf(“%d”,i); } }
amit166
585
views
amit166
asked
Jan 3, 2019
Programming in C
programming-in-c
for-loop
+
–
0
votes
0
answers
610
Gateforum Test Series
$a=a+100$ in function foo, does it increases the value of a by 100 or just increments the address.
$a=a+100$ in function foo, does it increases the value of a by 100 or just increments the address.
Gupta731
350
views
Gupta731
asked
Jan 2, 2019
Programming in C
gateforum-test-series
programming-in-c
+
–
0
votes
1
answer
611
# cprogramming
#include<stdio.h> int main() { int M = 2; int arr[M][M] = {0}; // Trying to initialize all values as 0 int i, j; for (i = 0; i < M; i++) { for (j = 0; j < M; j++) printf ("%d ", arr[i][j]); printf("\n"); } return 0; } what happen
#include<stdio.h int main() { int M = 2; int arr[M][M] = {0}; // Trying to initialize all values as 0 int i, j; for (i = 0; i < M; i++) { for (j = 0; j < M; j++) ...
amit166
462
views
amit166
asked
Jan 2, 2019
Programming in C
programming-in-c
+
–
0
votes
0
answers
612
Function Pointer question
#include<stdio.h> int main ( ) { int demo ( ); // What is this and what does it do? demo ( ); (*demo) ( ); } int demo ( ) { printf("Morning"); }
#include<stdio.h>int main ( ){ int demo ( ); // What is this and what does it do? demo ( ); (*demo) ( );}int demo ( ){ printf("Morning");}
gmrishikumar
850
views
gmrishikumar
asked
Jan 2, 2019
Programming in C
programming-in-c
pointers
array-of-pointers
functions
function-pointers
+
–
0
votes
0
answers
613
MadeEasy Full Length Test: Programming & DS - Programming in C
Consider the following function foo() void foo(int n) { if(n<=0) printf("Bye"); else { printf("Hi"); foo(n-3); printf("Hi"); foo(n-1); } } Let P(n) represent the recurrence relation indicating ... P(-2) But nothing is mentioned about P value when n<0. How to solve for P(-2) and other negative values?
Consider the following function foo()void foo(int n) { if(n<=0) printf("Bye"); else { printf("Hi"); foo(n-3); printf("Hi"); foo(n-1); } }Let P(n) represent the recurrence...
MiNiPanda
563
views
MiNiPanda
asked
Jan 1, 2019
Programming in C
made-easy-test-series
programming-in-c
+
–
0
votes
0
answers
614
C Programming
# include <stdio.h> int main( void ) { static int i = 6; if(--i){ main(); printf(“%d’,i+1); } return 0; } Let X be Number of 0’s and Y be number of 1’s printed by the code ..the value of 2X+Y is ? Answer is 5 here How?
# include <stdio.h>int main( void ){ static int i = 6; if( i){ main(); printf(“%d’,i+1); }return 0;} Let X be Number of 0’s and...
Ashwani Yadav
329
views
Ashwani Yadav
asked
Jan 1, 2019
Programming in C
programming-in-c
output
+
–
0
votes
2
answers
615
MadeEasy Test Series: Programming & DS - Programming in C
singh chetan
705
views
singh chetan
asked
Jan 1, 2019
Programming in C
made-easy-test-series
programming-in-c
data-structures
+
–
0
votes
0
answers
616
MadeEasy Test Series: Programming & DS - Programming In C
consider the following C code #define a(x+1) int x=2; void b() { x=9; printf("%d\n ,a); } void c() { int x=1; printf("%d\n ,a); } void main() { b(); c(); } which of the following is true output if ... 9,2 I calculated the right answer but now i want to ask what is the value of global x after the program execution is it 9 ,10 ??
consider the following C code #define a(x+1) int x=2; void b() { x=9; printf("%d\n”,a); } void c() { int x=1; printf("%d\n”,a); } void main() { b(); c(); }which of th...
Gurdeep Saini
445
views
Gurdeep Saini
asked
Dec 31, 2018
Programming in C
made-easy-test-series
programming-in-c
data-structures
+
–
0
votes
0
answers
617
MadeEasy Test Series 2019: Programming & DS - Programming In C
Please explain the solution, whats the actual logic in questions of Preprocessor codes?
Please explain the solution, whats the actual logic in questions of Preprocessor codes?
Markzuck
394
views
Markzuck
asked
Dec 30, 2018
Programming in C
made-easy-test-series
algorithms
programming-in-c
+
–
0
votes
0
answers
618
Self Doubt
Leaf Nodes =[ Internal nodes with degree 2 ] + 1 It is valid if we consider Tree as undirected graph ? Or is it valid only for Tree when considered as directed graph
Leaf Nodes =[ Internal nodes with degree 2 ] + 1It is valid if we consider Tree as undirected graph ?Or is it valid only for Tree when considered as directed graph
jatin khachane 1
754
views
jatin khachane 1
asked
Dec 29, 2018
DS
programming-in-c
tree
+
–
0
votes
0
answers
619
data structure
let R be the class of recursive program and l be the class of iterative program now consider below statement S S : every program in R uses strictly more space compare to its equivalent program in class I TRUE of FALSE ?
let R be the class of recursive program and l be the class of iterative program now consider below statement S S : every program in R uses strictly more space compare to ...
Rahul_Rathod_
335
views
Rahul_Rathod_
asked
Dec 28, 2018
Programming in C
data-structures
algorithms
programming-in-c
+
–
0
votes
0
answers
620
#c programming
#include <stdio.h> int cou=0; int cal(int a,int b){ int c; cou++; if(b==3) return(a*a*a); else{ c=cal(a,b/3); return(c*c*c); } } int main() { int d= cal(4,81); printf("%d",d); return 0; }
#include <stdio.h>int cou=0;int cal(int a,int b){ int c; cou++; if(b==3) return(a*a*a); else{ c=cal(a,b/3); return(c*c*c); }}int ma...
amit166
280
views
amit166
asked
Dec 28, 2018
Programming in C
programming-in-c
+
–
0
votes
1
answer
621
Made Easy2019
The minimum size of stack required to evaluate given post fix expression is _____________ postfix :- 2 5 x 6 + 4 2 x - MY ANSWER IS 8.. CAN ANYONE TELL ME WHERE I AM WRONG…??
The minimum size of stack required to evaluate given post fix expression is _____________postfix :- 2 5 x 6 + 4 2 x - MY ANSWER IS 8..CAN ANYONE TELL ME WHERE I AM WRONG�...
Vikas123
4.3k
views
Vikas123
asked
Dec 27, 2018
DS
data-structures
programming-in-c
gate-2019
preparation
+
–
4
votes
1
answer
622
GATE Overflow | Mock GATE | Test 1 | Question: 21
Consider the following C language code: #include<stdio.h> int main() { int x=64; int i=0; while (i++<3) x=(((x<<2)+(x>>1))>>1); printf("%d", x); return 0; } What is the output of the above code?
Consider the following C language code:#include<stdio.h int main() { int x=64; int i=0; while (i++<3) x=(((x<<2)+(x>>1))>>1); printf("%d", x); return 0; }What is the outp...
Ruturaj Mohanty
1.8k
views
Ruturaj Mohanty
asked
Dec 27, 2018
Programming and DS
go-mockgate-1
numerical-answers
programming-in-c
programming
output
+
–
2
votes
0
answers
623
GATE Overflow | Mock GATE | Test 1 | Question: 36
#include<stdio.h> #define create_node struct node {char x, y;}; #define call_main int main() { #define create_pointer struct node *p=&obj; #define create_object(a,b) struct node obj={b+a,a}; #define print_value printf("%c", *((char*)p+1 ... are correct Only $2$ and $3$ are correct $1$, $2$ and $4$ are correct Only $3$ is correct
#include<stdio.h>#define create_node struct node {char x, y;};#define call_main int main() {#define create_pointer struct node *p=&obj;#define create_object(a,b) struct n...
Ruturaj Mohanty
781
views
Ruturaj Mohanty
asked
Dec 27, 2018
Programming in C
go-mockgate-1
programming
pointers
programming-in-c
+
–
0
votes
0
answers
624
Testbook[Full syllabus Test]
jatin khachane 1
692
views
jatin khachane 1
asked
Dec 27, 2018
Programming in C
testbook-test-series
programming-in-c
+
–
1
votes
3
answers
625
Linked list
What does the following program do on two linked lists? Struct node *myFun (struct node * a, struct node * b) { Struct node *new = NULL ; If (a = = NULL) return (b) ; if (b = = NULL) return (a) ; If (a → data <= ... two linked lists by selecting the alternate nodes merges two sorted linked lists into final sorted linked list merges two linked lists by selecting the nodes in reverse.
What does the following program do on two linked lists? Struct node *myFun (struct node * a, struct node * b) { Struct node *new = NULL ; If (a = = NULL) return (b) ;...
sharadsingh
1.1k
views
sharadsingh
asked
Dec 27, 2018
DS
linked-list
data-structures
programming-in-c
+
–
0
votes
1
answer
626
Testbook Test Series: Programming & DS - Programming In C
Please someone explain me properly
Please someone explain me properly
Magma
575
views
Magma
asked
Dec 26, 2018
Programming in C
testbook-test-series
programming
programming-in-c
+
–
0
votes
0
answers
627
Calculate output
Find out the output of the given program? include<stdio.h> int main() { char s[] = "Hello"; char *ptr = s ; *ptr++; // please explain this line ptr++; printf("%s",ptr); return 0; }
Find out the output of the given program?include<stdio.h int main() { char s[] = "Hello"; char *ptr = s ; *ptr++; // please explain this line ptr++; ...
Abhishek Kumar 38
330
views
Abhishek Kumar 38
asked
Dec 26, 2018
Programming in C
programming-in-c
+
–
0
votes
0
answers
628
programming-loops
#include <stdio.h> int main() { int i = 3; while (i--) { int i = 100; i--; printf("%d ", i); } return 0; }
#include <stdio.h>int main(){ int i = 3; while (i ) { int i = 100; i ; printf("%d ", i); } return 0;}
sayakpaul
2.7k
views
sayakpaul
asked
Dec 23, 2018
Programming in C
programming-in-c
+
–
0
votes
0
answers
629
ME-FT
consider the following function secret (). unsigned char secret(unsigned char x,int y) { return ((x & 0x0F)<<y | (x & 0xF0)>>y); } int main() { unsigned char x=100; printf(“ %u”,secret(x,4)); return0; } the output obtained corresponding to the function call secret(100,4) is _
consider the following function secret (). unsigned char secret(unsigned char x,int y) { return ((x & 0x0F)<<y | (x & 0xF0)>>y); } int main() { unsigned char x=100; ...
Prateek Raghuvanshi
441
views
Prateek Raghuvanshi
asked
Dec 23, 2018
Programming in C
programming-in-c
+
–
0
votes
2
answers
630
Programming
The program fragment: int i= 263; putchar (i) (a) prints 263 (b) prints the ASCII equivalent of 263 (c) rings the bell (d) prints garbage
The program fragment: int i= 263; putchar (i)(a) prints 263 (b) prints the ASCII equivalent of 263...
sayakpaul
2.7k
views
sayakpaul
asked
Dec 23, 2018
Programming in C
programming-in-c
+
–
Page:
« prev
1
...
16
17
18
19
20
21
22
23
24
25
26
...
64
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register