menu
Recent questions tagged programming
Login
Register
My account
Edit my Profile
Private messages
My favorites
Register
Recent questions tagged programming
All Activity
Q&A
Questions
Unanswered
Tags
Categories
Users
Ask a Question
Blogs
Previous Year
Recent questions tagged programming
0
votes
0
answers
50
views
C LANGUAGE QUESTIONS
/* I HAVE COMMENTED MY ACTUAL QUESTION BELOW*/ #include<stdio.h> struct health{ #include<stdio.h> struct health { long long int mobile_no; int weight; float temperature; char blood_grp[10]; float height; }; int main() { int n; printf("Enter number of ... ;,sh[i].blood_grp); printf("\n%f",sh[i].height); } } return 0; } /* PLEASE CLARIFY MY QUERY*/
Kaneki
asked
in
Programming
Aug 12, 2021
by
Kaneki
5
points
50
views
programming
cprogramming
0
votes
0
answers
23
views
Cprogramming
Write a program to reverse each word of a string and print vowels in a capital letters in the reversed string. Is it possible to do because Strings are immutable.
Kaneki
asked
in
Programming
Aug 3, 2021
by
Kaneki
5
points
23
views
programming
cprogramming
0
votes
0
answers
63
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
63
views
programming
programming-in-c
self-doubt
0
votes
0
answers
27
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
27
views
self-doubt
programming
programming-in-c
0
votes
0
answers
69
views
Programming In C
Find the output of the program int main(void) { int i,j; for(j=i+1,i=1;i<=5;j++,i++) { printf(“%d%d\n”,i,j); } return 0; }
ShivangiChauhan
asked
in
Programming
Jul 24, 2021
by
ShivangiChauhan
17
points
69
views
programming
self-doubt
cprogramming
0
votes
0
answers
78
views
Programming Paradigms - Cain, Stanford
I was going through the link for best videos in Programming to be able to solve more output based questions in Gate. In the link : https://gatecse.in/best-video-lectures-for-gate-cse/ . It’s given “Doesn’t cover the entire GATE syllabus in programming but useful” Can I know what is missing, and from where to learn for rest of GATE syllabus?
xlr8_r
asked
in
Programming
Jul 18, 2021
by
xlr8_r
5
points
78
views
programming
0
votes
0
answers
83
views
File handling in c
Hi Is File handling topic in c programming is important for gate Or not It is necessary for doing file handling topic for gate ? Thank you
ykrishnay
asked
in
Programming
Jul 14, 2021
by
ykrishnay
103
points
83
views
programming
self-doubt
cprogramming
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
0
votes
0
answers
62
views
Made easy workbook c programming question
The correct answer is (b). I am not able to understand how it is the correct answer, please explain.
akshansh
asked
in
Programming
Jun 15, 2021
by
akshansh
15
points
62
views
programming
made-easy-workbook
operators
0
votes
1
answer
76
views
Previous year question paper
Consider the following set of Functional dependencies for relational schema R{A,B,C} F={A->BC, B->C, A->B, AB->C} (i) Find the key of relation R
Sneha Vashishtha
asked
in
Databases
Apr 23, 2021
by
Sneha Vashishtha
5
points
76
views
programming
1
vote
1
answer
97
views
type conversion in c programming
https://www.onlinegdb.com/edit/r1CBB9EHO #include<stdio.h> int main() { short int i = 10; char c = 'a'; float p = 3.0; short int s = i+c; printf("%d\n", sizeof(short int)); //size of short int is 2 printf("%d\n", ... short int whose size should be 2. */ printf("%d", sizeof(s)); // though here it is 2 which is correct. return 0; }
akshansh
asked
in
Programming
Apr 3, 2021
by
akshansh
15
points
97
views
programming
0
votes
0
answers
48
views
Gate 2019 Mining Question 19
If the time to failure of a machine component is exponentially distributed, the reliability of the same at Mean Time to Failure (MTTF) is ____
kartikb94
asked
in
Operating System
Mar 22, 2021
by
kartikb94
5
points
48
views
programming
self-doubt
0
votes
0
answers
94
views
Jest sample paper question number 7
function mu(a,b:integer) returns integer; var i,y: integer; begin ---------P---------- i = 0; y = 0; while (i < a) do begin --------Q------------ y := y + b ; i = i + 1 end return y end I arrived at the answer that Q=y<a P=y<i
hari1998
asked
in
Programming
Mar 21, 2021
by
hari1998
5
points
94
views
programming
1
vote
1
answer
89
views
Self doubt Pointers
Please explain how to get the outputs here? void main() { int i=255, j; char *p; p=&i; j=*p; *p=32; printf("%d %d",i,j); } void main() { int i=265, j; char *p; p=&i; j=*p; *p=32; printf("%d %d",i,j); }
Dheera
asked
in
Programming
Mar 9, 2021
by
Dheera
-8
points
89
views
programming
pointers
0
votes
0
answers
45
views
#operators_pointers_string
#include <stdio.h> #define VAL 32 int main() { char arr[] = "geeksquiz"; *(arr + 0) &= ~VAL; *(arr + 5) &= ~VAL; printf("%s", arr); return 0; }
Sur_1611
asked
in
Programming
Feb 18, 2021
by
Sur_1611
5
points
45
views
programming
0
votes
0
answers
49
views
Book: Gate Overflow Question no. 4.7.20 in the Programming in C section
hadarsh
asked
in
Programming
Jan 12, 2021
by
hadarsh
5
points
49
views
pointers
programming
0
votes
0
answers
29
views
TGA material
Q. What does the following program do when the input is unsigned 16-bit integer? #include<stdio.h> main() { unsigned int num; int i; scanf("%u",&num); for(i=0;i<16;i++) { printf("%d.",(num << i&1 <<15)?1:0 ... it prints all even bits from num (B) it prints all odd bits from num (C) it prints binary equivalent of num (D) none of the above
Enolx.21
asked
in
Programming
Dec 30, 2020
by
Enolx.21
53
points
29
views
programming
0
votes
1
answer
56
views
What would be the output of following program and why?
savvysiddharth
asked
in
Programming
Dec 26, 2020
by
savvysiddharth
5
points
56
views
programming
0
votes
1
answer
107
views
C- Programming Question on Pointers
What will be the output of the following program? #include "stdio.h" int main() { char a[] = { 'P', 'Q', 'R', 'S' }; char* p = &a[0]; *p++; printf("%c ", *++p); } According to my solution As we know that ... answer comes out to be Q , but when I ran the program, then it showed my R as the output. Can someone please help me with this?
Samarth Kejriwal
asked
in
Programming
Dec 2, 2020
by
Samarth Kejriwal
7
points
107
views
programming
pointers
arrays
0
votes
0
answers
45
views
Self Doubt : Bubble Sort
If a question is asked in GATE regarding bubble sort,should i take normal bubble sort or improved version of bubble sort? In some test series question, they are giving best case time complexity as O(n) instead of O(n^2) for bubble sort. So, which one should i take?
phaneendrababu
asked
in
Algorithms
Nov 26, 2020
by
phaneendrababu
11
points
45
views
algorithms
programming
0
votes
1
answer
43
views
Made Easy Test
Can someone explain how to find the complexity of this code( in a detailed way)
Ashutosh777
asked
in
Programming
Nov 22, 2020
by
Ashutosh777
-207
points
43
views
programming
1
vote
2
answers
105
views
#made-easy-test-series
consider the below function mystery(a,b) { if(a<0 or b<0) return 0; else if (a==0) return b+1; else if(b==0) return mystery(a-1,1); else return mystery(a-1,mystery(a,b-1)); } what would be the value of mystery(3,3)? ans is 61.I am not able to solve it in less time.can someone explain how to solve such type of questions?
404 found
asked
in
Programming
Nov 17, 2020
by
404 found
41
points
105
views
programming
0
votes
1
answer
70
views
#made-easy-test-series
which of the following relationship holds in general between the scope of a variable and the lifetime of a variable(in a language like c)? a)the scope of a variable is contained in the lifetime of the variable b)the scope of a variable is same as the ... c)the scope of a variable is disjoint from the scope of the variable d)none of the above ans is a.can someone explain?
404 found
asked
in
Programming
Nov 17, 2020
by
404 found
41
points
70
views
programming
1
vote
2
answers
83
views
Self doubt:Programming
#include <stdio.h> int main(void) { int b=-1,a=-2; while(+(+b--)!=1){ b-=a++; } printf("%d",b); return 0; } What will be output of this code? I thought output should be 1, but getting no output. Plz tell me why no output here?
srestha
asked
in
Programming
Nov 13, 2020
by
srestha
1.0k
points
83
views
programming
self-doubt
2
votes
0
answers
104
views
Made easy self doubt on C programming
Isnt the answer 21?
ijnuhb
asked
in
Programming
Nov 12, 2020
by
ijnuhb
751
points
104
views
programming
1
vote
0
answers
35
views
General_Doubt
int main() { int arr[2][3][3]= {'A','B','C','D','E','F','G','H','I','J','K' ,'L','M','N'}; int (*p)[2][3][3]= &arr; printf("%d",(*(*(*p)[0]+5))-(*(*(*p)[1]-3))); } ANS: -1 //F-G here the pointer p is ... pointer as for 3D array it should have been (*p) [3][3] and that is why (*p) is pointing to the whole 3D array not any element of it. Please correct me if i am wrong.
Sahil91
asked
in
Programming
Nov 12, 2020
by
Sahil91
687
points
35
views
programming
2
votes
1
answer
49
views
NIC Testbook test series
Find the number of times ‘for’ loop runs successfully and the output printed by variable ‘sum’ for the given below code: #include<stdio.h> int x = 14; int fun() { return x--; } int main () { int sum = 0; for(fun();--x;fun()) sum = sum + fun(); printf(‘%d”, sum); return 0; } Options are : 4, 30 5, 26 4, 26 5, 30
rsamarth
asked
in
Programming
Nov 9, 2020
by
rsamarth
29
points
49
views
programming
1
vote
1
answer
73
views
Fork system call self doubt
main() { int a=1, b=2, c=0; c+=a++*++b; print(a,b,c); if(fork()==0) { a+=b+=c+=2; print(a,b,c); c++; } else { b+=c+=a+=3; print(a,b,c); c--; } print(c); } What is the output when this program is executed? Please show the intermediate results also.
Dheera
asked
in
Operating System
Nov 7, 2020
by
Dheera
-8
points
73
views
self-doubt
programming
0
votes
0
answers
35
views
Self Doubt Algorithms
what is time complexity to insert a node based on key in a priority queue? O(nlogn) O(logn) O(n) (n2) i am unable to get the meaning of the question . is it a simple insertion in the priority queue?? . what is the meaning of “based on key”.Please explain this….
manal jain
asked
in
Programming
Oct 20, 2020
by
manal jain
5
points
35
views
algorithms
self-doubt
programming
logarithms
0
votes
0
answers
45
views
C programming self doubt
int a=14; a=a++; Why is the final output of a is 14 and not 15? Since post operator is used so first the value 14 will be assigned to “a” and then “a” will get incremented to 15.So final value should be 15.But why it is coming output as 14?
vishal burnwal
asked
in
Programming
Oct 19, 2020
by
vishal burnwal
77
points
45
views
programming
1
vote
2
answers
61
views
Self Doubt Algorithms
I was having a doubt that should we consider = or I am finding different answers on the internet.
satvik
asked
in
Algorithms
Oct 17, 2020
by
satvik
11
points
61
views
self-doubt
algorithms
programming
logarithms
0
votes
1
answer
87
views
geeksforgeeks
#include <stdio.h> int main() { void demo(); void (*fun)(); fun = demo; (*fun)(); fun(); return 0; } void demo() { printf("GeeksQuiz "); } what will be its output and please explain as well!
Setika Mehra
asked
in
Programming
Sep 22, 2020
by
Setika Mehra
13
points
87
views
programming
0
votes
0
answers
53
views
p&ds(madeeasy subjectwise test)
In this last statement printf(“ \n %d %d “,s,t ) ; s value should be printed as 2 beacuse in the statement t= p + q+ s++ , s is post incremented so its value is incremented next statement but the sol gives value of s=2. What is the approach ?
nitin21038
asked
in
Programming
Sep 22, 2020
by
nitin21038
2
points
53
views
programming
0
votes
0
answers
30
views
Geeksforgeeks
You are given a list of 5 integers and these integers are in the range from 1 to 6. There are no duplicates in list. One of the integers is missing in the list. Which of the following expression would give the missing number. ^ is bitwise XOR operator. ~ is bitwise NOT operator. Let elements of list can ... [4] ^ 1 ^ 2 ^ 3 ^ 4 ^ 5 D ~(list[0] ^ list[1] ^ list[2] ^ list[3] ^ list[4])
Musa
asked
in
Programming
Sep 21, 2020
by
Musa
5
points
30
views
programming
0
votes
2
answers
87
views
madeeasy topicwise
A 3-ary tree in which every internal node has exactly 3 children. The number of leaf nodes in such a tree with 10 internal nodes will be _____
nitin21038
asked
in
Programming
Sep 13, 2020
by
nitin21038
2
points
87
views
programming
0
votes
0
answers
72
views
topictest-madeeasy
no of digits in n integer part of logarithm of n base 2 fn always return 0 n/2 the sol is given as b) but I am getting a) as the answer
nitin21038
asked
in
Programming
Sep 12, 2020
by
nitin21038
2
points
72
views
programming
0
votes
0
answers
148
views
Made easy theory, Self doubt in pointers
#include<stdio.h> int main() { char *p1="Graduate"; char *p2=p1; printf("%c",*++p2); printf("%d",sizeof(p2)); return 0; }
sarthakdarji
asked
in
Programming
Sep 11, 2020
by
sarthakdarji
11
points
148
views
programming
0
votes
0
answers
97
views
Understanding pointers in C (Yashavant Kanetkar)
Can anyone please provide the output of the below code with proper explanation:- #include <stdio.h> show(int(*q)[3][4],int ii,int jj,int kk){ int i,j,k; int *p; for(i=0;i<ii;i++){ for(j=0;j<jj;j++){ p=q[i][j]; printf("\nThis is %d\n",q[i][ ... 7,8, 9,3,2,1}, { 2,3,5,7, 4,3,9,2, 1,6,3,6} }; show(a, 2, 3,4 ) ; } Thanks in advance.
Pratyush Priyam Kuan
asked
in
Programming
Sep 9, 2020
by
Pratyush Priyam Kuan
1.1k
points
97
views
pointers
programming
arrays
0
votes
1
answer
109
views
Self doubt:Programming
What will be meaning of printf("%d",--*p); will return? I mean if ‘p’ pointing some address, will --*p decrement on the address or it will decrement the value of that address?
srestha
asked
in
Programming
Sep 6, 2020
by
srestha
1.0k
points
109
views
programming
0
votes
0
answers
61
views
Programming :ME
#include<stdio.h> int main(){ int i=500; int *p=&i; foo(&p); printf("%d",*p); return 0; } void foo(int **p1){ int j=2; *p1=&j; printf("%d",**p1); } My doubt what happen when double pointer working as single pointer? *p1=&j in 11th line? Will it work like single pointer? And what will be the output?
srestha
asked
in
Programming
Sep 6, 2020
by
srestha
1.0k
points
61
views
programming
Page:
1
2
3
4
...
7
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 Video Solutions