menu
Recent questions tagged programming-in-c
Login
Register
My account
Edit my Profile
Private messages
My favorites
Register
Recent questions tagged programming-in-c
All Activity
Q&A
Questions
Unanswered
Tags
Categories
Users
Ask a Question
Blogs
Previous Year
Exams
Recent questions tagged programming-in-c
0
votes
0
answers
15
views
Operator
Question 4 * 12 + 20 -20 = 48; what is wrong with it . Ans = 47 how explain me please;
PrateekGiri
asked
in
Programming
Apr 12
by
PrateekGiri
5
points
15
views
programming-in-c
operators
0
votes
0
answers
55
views
Self Doubt from Structure
Why Structures can’t have static members? Also if there is a static function in some file and in another file we are trying to use that function using extern then is it accessible?
Ananya Nayak
asked
in
Programming
Aug 1, 2021
by
Ananya Nayak
5
points
55
views
programming
programming-in-c
self-doubt
0
votes
0
answers
25
views
Self doubt
Is global structure a static structure and what do we exactly mean by a static structure?
Ananya Nayak
asked
in
Programming
Aug 1, 2021
by
Ananya Nayak
5
points
25
views
self-doubt
programming
programming-in-c
0
votes
0
answers
25
views
programing loops
Q 19. for (I=1 ; I<=n ; J++) for (J=I +1 ; J<=n ; J++) for (K=1 ; K<=J ; K++) printf(“pankaj”); how many time pankaj will be printed sole with sumation method
Kunal Sawant
asked
in
Programming
Jul 1, 2021
by
Kunal Sawant
5
points
25
views
programming
programming-in-c
3
votes
5
answers
1.5k
views
GATE CSE 2021 Set 2 | Question: 10 | Video Solution
Arjun
asked
in
Programming
Feb 18, 2021
by
Arjun
1.4k
points
1.5k
views
gate2021-cse-set2
programming-in-c
arrays
output
0
votes
2
answers
746
views
GATE CSE 2021 Set 2 | Question: 35 | Video Solution
Arjun
asked
in
Programming
Feb 18, 2021
by
Arjun
1.4k
points
746
views
gate2021-cse-set2
programming-in-c
normal
pointers
1
vote
2
answers
620
views
GATE CSE 2021 Set 1 | Question: 37 | Video Solution
Arjun
asked
in
Programming
Feb 18, 2021
by
Arjun
1.4k
points
620
views
gate2021-cse-set1
programming-in-c
0
votes
1
answer
124
views
Gate Zeal Question
Mellophi
asked
in
Programming
Sep 4, 2020
by
Mellophi
363
points
124
views
programming-in-c
0
votes
1
answer
110
views
Gate Zeal Question
#include <stdio.h> int main(){ char a[] = "GATEATZEAL"; char b[20]; char *ps, *pt; ps = a; pt = b; while(*pt){ *pt++=*ps++; } *pt = '\0'; printf("%s\n",b); return 0; } What is the output? P.S – I compiled on 6 different compilers and 5 gave GATEAT one gave GAT I have no idea how. Please explain.
Mellophi
asked
in
Programming
Sep 3, 2020
by
Mellophi
363
points
110
views
programming-in-c
2
votes
1
answer
121
views
Programming:ME
#include<stdio.h> main() { static char *s[]={"madeeasy","online","test”,"series"}; char **ptr[]={s+3,s+2,s+1,s},***p; p=ptr; ++p; printf("%s",*--*++p+3); } What will be printed as output?
srestha
asked
in
Programming
Aug 31, 2020
by
srestha
1.0k
points
121
views
programming
programming-in-c
0
votes
2
answers
84
views
Made Easy Topic Wise
How are we considering the address A[15][25] for a LTM? Shouldn’t valid addresses be till i=j ?
Mellophi
asked
in
Programming
Aug 30, 2020
by
Mellophi
363
points
84
views
made-easy-test-series
programming-in-c
0
votes
1
answer
194
views
Made Easy Topic Wise
Mellophi
asked
in
Programming
Aug 30, 2020
by
Mellophi
363
points
194
views
made-easy-test-series
programming-in-c
1
vote
1
answer
121
views
Programming :GB
#include<stdio.h> #include<string.h> void fun1(char *p){ if(*p){ fun1(p+1); printf("%c",*p++); } } void fun2(char *p){ if(*p){ fun2(p+1); printf("%c",*p--); } } int main(){ char *str="FLOW"; fun2(str); printf("\t"); fun1(str); return 0; } Someone please discuss , how postdecrement and postincrement working in this program?
srestha
asked
in
Programming
Aug 26, 2020
by
srestha
1.0k
points
121
views
programming-in-c
0
votes
2
answers
233
views
Pointer Programming
#include<stdio.h> int main() { int arr[] = {10, 20, 30, 40, 50, 60}; int *ptr1 = arr; int *ptr2 = arr + 5; printf("Number of elements between two pointer are: %d.", (ptr2 - ptr1)); printf("Number of bytes between two pointers are: %d", (char*)ptr2 - (char*) ptr1); return 0; } Number of elements :5 Number of bytes :20 How ?
val_pro20
asked
in
Programming
Aug 17, 2020
by
val_pro20
2
points
233
views
programming-in-c
0
votes
1
answer
195
views
String Programming
#include <stdio.h> int fun(char *p) { if (p == NULL || *p == ' ') return 0; int current = 1, i = 1; while (*(p+current)) { if (p[current] != p[current-1]) { p[i] = p[current]; i++; } current++; } *(p+i)=' ... I am getting output :gekskeg eg But the answer given is option a in the link-https://www.geeksforgeeks.org/c-language-2-gq/string-gq/ Question 12 .Anybody kindly help.
val_pro20
asked
in
Programming
Aug 16, 2020
by
val_pro20
2
points
195
views
programming-in-c
0
votes
2
answers
829
views
Array-Programming
#include <stdio.h> int main() { char p; char buf[10] = {1, 2, 3, 4, 5, 6, 9, 8}; p = (buf + 1)[5]; printf("%dn", p); return 0; } what is the output of this code ?
val_pro20
asked
in
Programming
Aug 16, 2020
by
val_pro20
2
points
829
views
programming
programming-in-c
arrays
0
votes
1
answer
34
views
#Gate Forum Preparation #Compiler design
Suchismita1
asked
in
Compiler Design
Aug 9, 2020
by
Suchismita1
5
points
34
views
programming-in-c
compiler-design
0
votes
1
answer
74
views
C-Programming
#include <stdio.h> #define funct(x) x*x+x int main(){ int x; x=36+funct(5) * funct(3); printf("%d",x); return 0; }
Alok Aryan
asked
in
Programming
Jul 30, 2020
by
Alok Aryan
5
points
74
views
programming-in-c
0
votes
1
answer
41
views
Programming in C
In C, can we declare the variable at the expression 1 of for loop? Why?
Richa Agrawal
asked
in
Programming
Jul 17, 2020
by
Richa Agrawal
5
points
41
views
programming
programming-in-c
loops
for-loop
0
votes
0
answers
39
views
Locality of Reference(OS+DS) (ACE) #Gate Overflow #Arrays
codelite
asked
in
DS
Jul 17, 2020
by
codelite
5
points
39
views
programming-in-c
0
votes
0
answers
51
views
Programming and DS
Can anyone give solution of this C Programming question
Richa Agrawal
asked
in
Programming
Jul 13, 2020
by
Richa Agrawal
5
points
51
views
programming
programming-in-c
dynamic-scoping
0
votes
1
answer
44
views
Made Easy Programmin And Data Structure Practise Set
Prakhar Garg
asked
in
Programming
Jul 13, 2020
by
Prakhar Garg
5
points
44
views
programming-in-c
programming
expression
0
votes
0
answers
80
views
Madeeasy Programming and Data Structure Notes
In Dynamic Scoping , an extern variable will take value from Global Variable or Local variable , please tell me with respect to following question and also the printf results?
Prakhar Garg
asked
in
Programming
Jul 3, 2020
by
Prakhar Garg
5
points
80
views
programming
programming-in-c
dynamic-scoping
extern-variable
0
votes
0
answers
38
views
Programming: Abstraction
Which of the following statement(s) is/are TRUE? (i). Abstraction principle includes use abstraction whenever possible to avoid duplication (ii). Encapsulation and abstraction differ as binding and hiding respectively (iii). Logical, Physical and View are level of abstraction
luc_Bloodstone
asked
in
Programming
May 29, 2020
by
luc_Bloodstone
19
points
38
views
programming
programming-in-c
abstraction
0
votes
0
answers
33
views
Programming : Encapsulation
Which among the following would destroy the encapsulation mechanism if it was allowed in programming? 1. Using access declaration for local variable of main() function 2. Using access declaration for private members of base class 3.Using access declaration for public members of base class 4.Using access declaration for global variables
luc_Bloodstone
asked
in
Programming
May 29, 2020
by
luc_Bloodstone
19
points
33
views
programming
programming-in-c
encapsulation
0
votes
2
answers
47
views
C programming Control Statement doubt
#include<stdio.h> int main() { char ch=’a’; switch(ch) { case ‘a’ && 1: printf(“Hello”); case ’b’ && 1: printf(“world”); break; default: printf(“GATE”); } }
VIKAS PARA
asked
in
Programming
May 13, 2020
by
VIKAS PARA
5
points
47
views
programming
cprogramming
programming-in-c
switchcase
0
votes
0
answers
19
views
GATE2017-2-55 Video Solution
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; } The output of the program is _______
admin
asked
in
Programming
Apr 18, 2020
by
admin
585
points
19
views
gate2017-2
programming-in-c
numerical-answers
video-solution
0
votes
0
answers
28
views
GATE2017-1-36 Video Solution
Consider the C functions foo and bar given below: int foo(int val) { int x=0; while(val > 0) { x = x + foo(val--); } return val; } int bar(int val) { int x = 0; while(val > 0) { x= ... result in: Return of $6$ and $6$ respectively. Infinite loop and abnormal termination respectively. Abnormal termination and infinite loop respectively. Both terminating abnormally.
admin
asked
in
Programming
Apr 18, 2020
by
admin
585
points
28
views
gate2017-1
programming-in-c
programming
normal
video-solution
0
votes
0
answers
25
views
GATE2017-1-53 Video Solution
Consider the following C program. #include<stdio.h> #include<string.h> void printlength(char *s, char *t) { unsigned int c=0; int len = ((strlen(s) - strlen(t)) > c) ? strlen(s) : strlen(t); printf("%d\n", len); } ... defined in $string.h$ as returning a value of type $size\_t$, which is an unsigned int. The output of the program is __________ .
admin
asked
in
Programming
Apr 18, 2020
by
admin
585
points
25
views
gate2017-1
programming
programming-in-c
normal
numerical-answers
video-solution
0
votes
0
answers
27
views
GATE2015-1-35 Video Solution
What is the output of the following C code? Assume that the address of $x$ is $2000$ (in decimal) and an integer requires four bytes of memory. int main () { unsigned int x [4] [3] = {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}, {10, 11, 12}}; printf ("%u, %u, %u", x + 3, *(x + 3), *(x + 2) + 3); } $2036, 2036, 2036$ $2012, 4, 2204$ $2036, 10, 10$ $2012, 4, 6$
admin
asked
in
Programming
Apr 18, 2020
by
admin
585
points
27
views
gate2015-1
programming
programming-in-c
normal
video-solution
0
votes
0
answers
21
views
GATE2017-1-13 Video Solution
Consider the following C code: #include<stdio.h> int *assignval (int *x, int val) { *x = val; return x; } void main () { int *x = malloc(sizeof(int)); if (NULL == x) return; x = assignval (x,0); if (x) ... $x == NULL$ and not as shown. compiles successfully but execution may result in dangling pointer. compiles successfully but execution may result in memory leak.
admin
asked
in
Programming
Apr 18, 2020
by
admin
585
points
21
views
gate2017-1
programming-in-c
programming
video-solution
0
votes
0
answers
21
views
GATE2014-2-34 Video Solution
For a C program accessing $\mathbf{X[i] [j] [k]}$, the following intermediate code is generated by a compiler. Assume that the size of an integer is $32$ bits and the size of a character is $8$ bits. t0 = i ∗ 1024 t1 = j ∗ 32 t2 = k ∗ 4 t3 = t1 + t0 t4 ... as "char $\mathbf{X[4] [32] [8]}$ . $\mathbf{X}$ is declared as "char $\mathbf{X[32] [16] [2]}$ .
admin
asked
in
Compiler Design
Apr 18, 2020
by
admin
585
points
21
views
gate2014-2
compiler-design
intermediate-code
programming-in-c
normal
video-solution
0
votes
0
answers
28
views
GATE2017-1-55 Video Solution
The output of executing the following C program is _______________ . #include<stdio.h> int total(int v) { static int count = 0; while(v) { count += v&1; v >>= 1; } return count; } void main() { static int x=0; int i=5; for(; i>0; i--) { x = x + total(i); } printf("%d\n", x); }
admin
asked
in
Programming
Apr 18, 2020
by
admin
585
points
28
views
gate2017-1
programming
programming-in-c
normal
numerical-answers
video-solution
1
vote
1
answer
67
views
GATE2006-IT-49 Video Solution
Which one of the choices given below would be printed when the following program is executed ? #include <stdio.h> struct test { int i; char *c; }st[] = {5, "become", 4, "better", 6, "jungle", 8, "ancestor", 7, " ... $\text{etter, u, 6, ungle}$ $\text{cetter, k, 6, jungle}$ $\text{etter, u, 8, ncestor}$
admin
asked
in
Programming
Apr 18, 2020
by
admin
585
points
67
views
gate2006-it
programming
programming-in-c
normal
video-solution
0
votes
0
answers
27
views
GATE2003-2 Video Solution
Assume the following C variable declaration: int *A[10], B[10][10]; Of the following expressions: $A[2]$ $A[2][3]$ $B[1]$ $B[2][3]$ which will not give compile-time errors if used as left hand sides of assignment statements in a C program? I, II, and IV only II, III, and IV only II and IV only IV only
admin
asked
in
Programming
Apr 18, 2020
by
admin
585
points
27
views
gate2003
programming
programming-in-c
easy
video-solution
0
votes
0
answers
20
views
GATE2015-3-48 Video Solution
Consider the following C program: #include<stdio.h> int main() { int i, j, k = 0; j=2 * 3 / 4 + 2.0 / 5 + 8 / 5; k-=--j; for (i=0; i<5; i++) { switch(i+k) { case 1: case 2: printf("\n%d", i+k); case 3: printf("\n%d", i+k); default: printf("\n%d", i+k); } } return 0; } The number of times printf statement is executed is _______.
admin
asked
in
Programming
Apr 18, 2020
by
admin
585
points
20
views
gate2015-3
programming
programming-in-c
normal
numerical-answers
video-solution
0
votes
0
answers
32
views
GATE2006-IT-50 Video Solution
Which one of the choices given below would be printed when the following program is executed? #include <stdio.h> void swap (int *x, int *y) { static int *temp; temp = x; x = y; y = temp; } void printab () { static int i, a = -3, b = -6; i = 0; while (i <= 4) { if ((i++)%2 == ... $a = 12, b = 9$ $a = 3, b = 6$ $a = 3, b = 6$ $a = 6, b = 3$ $a = 15, b = 12$
admin
asked
in
Programming
Apr 18, 2020
by
admin
585
points
32
views
gate2006-it
programming
programming-in-c
normal
video-solution
0
votes
0
answers
25
views
GATE2001-2.18 Video Solution
Consider the following three C functions: $[P1]$ int *g(void) { int x = 10; return (&x); } $[P2]$ int *g(void) { int *px; *px = 10; return px; } $[P3]$ int *g(void) { int *px; px = (int*) malloc (sizeof(int)); *px = 10; ... of the above three functions are likely to cause problems with pointers? Only $P3$ Only $P1$ and $P3$ Only $P1$ and $P2$ $P1, P2$ and $P3$
admin
asked
in
Programming
Apr 18, 2020
by
admin
585
points
25
views
gate2001
programming
programming-in-c
normal
video-solution
1
vote
1
answer
49
views
GATE2016-1-15 Video Solution
Consider the following C program. # include <stdio.h> void mystery (int *ptra, int *ptrb) { int *temp; temp = ptrb; ptrb =ptra; ptra = temp; } int main () { int a = 2016, b=0, c= 4, d = 42; mystery (&a, &b); if (a < c) mystery (&c, &a); mystery (&a, &d); print f("%d\n", a); } The output of the program is _________.
admin
asked
in
Programming
Apr 18, 2020
by
admin
585
points
49
views
gate2016-1
programming-in-c
easy
numerical-answers
video-solution
0
votes
0
answers
17
views
GATE2000-1.17, ISRO2015-79 Video Solution
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
admin
asked
in
Programming
Apr 18, 2020
by
admin
585
points
17
views
gate2000
programming
programming-in-c
easy
isro2015
video-solution
Page:
1
2
3
4
next »
Ask a Question
Quick search syntax
tags
tag:apple
author
user:martin
title
title:apple
content
content:apple
exclude
-tag:apple
force match
+apple
views
views:100
score
score:10
answers
answers:2
is accepted
isaccepted:true
is closed
isclosed:true
Welcome to GATE CSE Doubts, where you can ask questions and receive answers from other members of the community.
Recent Posts
New GATEOverflow PDFs
Guidelines to users
No Recent Blog Comments
Search GATE CSE Doubts