Login
Register
@
Dark Mode
Profile
Edit my Profile
Messages
My favorites
Register
Activity
Q&A
Questions
Unanswered
Tags
Subjects
Users
Ask
Previous Years
Blogs
New Blog
Exams
Dark Mode
Recent questions tagged macros
4
votes
1
answer
1
what will be output and explain how
#include<stdio.h> #include<string.h> #define MAX(x, y) ((x) > (y) ? (x) : (y)) int main() { int i = 10, j = 5, k = 0; k = MAX(i++, ++j); printf("%d %d %d", i, j, k); return 0; }
ritwik_07
asked
in
Programming in C
Jun 10, 2023
by
ritwik_07
438
views
macros
programming-in-c
0
votes
0
answers
2
#self doubt
Assembler,Linker,Macros are there in compiler design?
samarpita
asked
in
Compiler Design
Dec 9, 2021
by
samarpita
327
views
compiler-design
macros
linker
assembler
0
votes
1
answer
3
Define keyword
Float pi = 3.14 #define pi 3.14 Why constant declaration with define is considered to be fast than above one? Thanks
Mayankprakash
asked
in
Programming in C
Jul 15, 2018
by
Mayankprakash
338
views
macros
5
votes
2
answers
4
ISRO2018-67
In multi-programmed systems, it is advantageous if some programs such as editors anf compilers can be shared by several users. Which of the following must be true of multi-programmed systems in order that a single copy of a program can be shared by several users? The program is a macro The program is recursive The program is reentrant I only II only III only I, II and III
Arjun
asked
in
Operating System
Apr 22, 2018
by
Arjun
3.2k
views
isro2018
operating-system
macros
5
votes
1
answer
5
Doubt
#include <stdio.h> #define A -B #define B -C #define C 5 int main(void) { printf("%d",A); return 0; } now my doubt here is, before compilaion i think macro will make printf part as, printf("%d",--5); which should give L-value ... ("%d",-(-5)); leading to no compiler error and giving answer as 5, but macro implicitly never put precedence braces() itself...
joshi_nitish
asked
in
Programming in C
Nov 5, 2017
by
joshi_nitish
939
views
macros
2
votes
1
answer
6
Use of macro instead of function is recommended.
Use of macro instead of function is recommended. (a) when one wants to reduce the execution time (b) when there is a loop with a function call inside (c) when a function is called in many places in a program (d) In (a) and (b) above Can some one explain how option 'b' is true?
sunil sarode
asked
in
Programming in C
Nov 4, 2017
by
sunil sarode
3.4k
views
programming-in-c
macros
functions
1
vote
1
answer
7
GATE CSE 1989 | Question: 4-vi
Consider the definition of macro $B,$ nested within the definition of a macro $A.$ Can a call to macro $B$ also appear within macro $A?$ If not, why not? If yes, explain if there are any restrictions.
makhdoom ghaya
asked
in
Compiler Design
Nov 30, 2016
by
makhdoom ghaya
731
views
gate1989
descriptive
compiler-design
macros
unsolved
0
votes
1
answer
8
UGC NET CSE | August 2016 | Part 3 | Question: 45
Match each software term in List-I to its description in List-II : ... $\text{a-iv, b-iii, c-v, d-i, e-ii}$ $\text{a-iv, b-iii, c-ii, d-v, e-i}$
makhdoom ghaya
asked
in
Others
Oct 4, 2016
by
makhdoom ghaya
1.1k
views
ugcnetcse-aug2016-paper3
system-software-compilers
macros
1
vote
1
answer
9
UGC NET CSE | December 2010 | Part 2 | Question: 32
'Macro' in an assembly level program is _______. Sub program A complete program A hardware portion Relative coding
makhdoom ghaya
asked
in
CO and Architecture
Sep 8, 2016
by
makhdoom ghaya
2.2k
views
ugcnetcse-dec2010-paper2
co-and-architecture
assembly
macros
1
vote
2
answers
10
Output of C program
Please explain the solution.The output is 11 7 0 #define MAX(x,y) (x) > (y) ? (x) : (y) main() { int i = 10, j = 5, k = 0; k == MAX(i++, ++j); printf("%d %d %d", i,j,k); } What will the values of i , j and k?
Anushka Basu
asked
in
Programming in C
Jul 21, 2016
by
Anushka Basu
1.7k
views
programming-in-c
output
macros
7
votes
9
answers
11
ISRO2014-3
What is the output of the following C program? #include<stdio.h> #define SQR(x) (x*x) int main() { int a; int b=4; a=SQR(b+2); printf("%d\n",a); return 0; } 14 36 18 20
pooja14
asked
in
Programming in C
Jun 22, 2016
by
pooja14
8.1k
views
programming-in-c
macros
isro2014
1
vote
1
answer
12
Prog\ What is the output
#include <stdio.h> #define crypt(s,t,u,m,p,e,d) m##s##u##t #define begin crypt(a,n,i,m,a,t,e) int begin() { printf("Hello\n"); return 0; } Options are : (a) Hello (b) Link error (c) Segmentation fault (d) Compiler error
Desert_Warrior
asked
in
Programming in C
May 16, 2016
by
Desert_Warrior
694
views
programming-in-c
macros
1
vote
2
answers
13
MadeEasy Test Series: Programming & DS - Programming In C
Consider the following program: # define Rec(a) a + a * a int a; a = 20 + Rec(a) * Rec(a + 1); printf(“%d”, a) return 0; } The output of above program for a = 3 is ________.
khushtak
asked
in
Programming in C
Jan 30, 2016
by
khushtak
446
views
made-easy-test-series
programming
programming-in-c
macros
8
votes
2
answers
14
ISRO2015-76
Consider the following statements #define hypotenuse (a, b) sqrt (a*a+b*b); The macro call hypotenuse(a+2,b+3); Finds the hypotenuse of a triangle with sides $a+2$ and $b+3$ Finds the square root of $(a+2)^2$ and $(b+3)^2$ Is invalid Find the square root of $3 *a+4*b+5$
Purple
asked
in
Programming in C
Jan 26, 2016
by
Purple
5.9k
views
programming-in-c
macros
isro2015
8
votes
2
answers
15
GATE CSE 1996 | Question: 2.16
Which of the following macros can put a macro assembler into an infinite loop? .MACRO M1, X .IF EQ, X ;if X=0 then M1 X + 1 .ENDC .IF NE, X ;if X ≠ O then .WORD X ;address (X) is stored here .ENDC .ENDM .MACRO M2, X .IF EQ, X M2 X .ENDC .IF NE, X .WORD X + 1 .ENDC .ENDM (ii) only (i) only both (i) and (ii) None of the above
Kathleen
asked
in
Compiler Design
Oct 9, 2014
by
Kathleen
3.7k
views
gate1996
compiler-design
macros
normal
15
votes
3
answers
16
GATE CSE 1995 | Question: 1.11
What are $x$ and $y$ in the following macro definition? macro Add x, y Load y Mul x Store y end macro Variables Identifiers Actual parameters Formal parameters
Kathleen
asked
in
Compiler Design
Oct 8, 2014
by
Kathleen
4.6k
views
gate1995
compiler-design
macros
easy
16
votes
2
answers
17
GATE CSE 1997 | Question: 1.9
The conditional expansion facility of macro processor is provided to test a condition during the execution of the expanded program to expand certain model statements depending upon the value of a condition during the execution of the expanded ... recursion to expand certain model statements depending upon the value of a condition during the process of macro expansion
Kathleen
asked
in
Compiler Design
Sep 29, 2014
by
Kathleen
5.1k
views
gate1997
compiler-design
macros
easy
7
votes
3
answers
18
GATE CSE 1992 | Question: 01,vii
Macro expansion is done in pass one instead of pass two in a two pass macro assembler because _________
Kathleen
asked
in
Compiler Design
Sep 12, 2014
by
Kathleen
1.5k
views
gate1992
compiler-design
macros
easy
fill-in-the-blanks
To see more, click for the
full list of questions
or
popular tags
.
Subscribe to GATE CSE 2024 Test Series
Subscribe to GO Classes for GATE CSE 2024
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
Recent Posts
Post GATE 2024 Guidance [Counseling tips and resources]
GATE CSE 2024 Result Responses
[Project Contest] Pytorch backend support for MLCommons Cpp Inference implementation
Participating in MLCommons Inference v4.0 submission (deadline is February 23 12pm IST)
IIITH PGEE 2024 Test Series by GO Classes
Subjects
All categories
General Aptitude
(3.5k)
Engineering Mathematics
(10.4k)
Digital Logic
(3.6k)
Programming and DS
(6.2k)
Algorithms
(4.8k)
Theory of Computation
(6.9k)
Compiler Design
(2.5k)
Operating System
(5.2k)
Databases
(4.8k)
CO and Architecture
(4.0k)
Computer Networks
(4.9k)
Artificial Intelligence
(79)
Machine Learning
(48)
Data Mining and Warehousing
(25)
Non GATE
(1.4k)
Others
(2.7k)
Admissions
(684)
Exam Queries
(1.6k)
Tier 1 Placement Questions
(17)
Job Queries
(80)
Projects
(11)
Unknown Category
(870)
64.3k
questions
77.9k
answers
244k
comments
80.0k
users
Recent questions tagged macros
Recent Blog Comments
category ?
Hi @Arjun sir, I have obtained a score of 591 in ...
download here
Can you please tell about IIT-H mtech CSE self...
Please add your admission queries here:...