Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write C macro with name give_info which takes two argument such that first arguments is character array and second one is an integer. For these

  1. Write C macro with name give_info which takes two argument such that first arguments is character array and second one is an integer.

For these given inputs:

_____________________________________________________

char ders_ksaltma[3]={'A','C','M');

int code=222;

_____________________________________________________

give_info(ksaltma,code);

gives following output:

Department: ACM Course Code=222

  1. Write C macro with name MAX which returns the bigger number for given two arguments0. (dont forget that macro arguments are typless).
  2. What is the output of this program?

#include < iostream >

using namespace std;

#define PR(id) printf("The value of " #id " is)

int main(){

int i = 10;

PR(i);

return 0;}

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

5. Prepare for the role of interviewee

Answered: 1 week ago