GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

GeekInterview.com  >  Placement Papers  >  TCS  >  C
Go To First  |  Previous Question  |  Next Question 
 C  |  Question 28 of 87    Print  
# define prod(a,b)=a*b
main()
{
int x=2;
int y=3;
printf("%d",prod(x+2,y-10)); }

the output of the program is
a.8
b.6
c.7
d.none
A



  
Total Answers and Comments: 2 Last Update: February 10, 2006   
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
May 07, 2005 07:20:09   #1  
avula tirupathi rao        

RE: # define prod(a,b)=a*bmain(){int x=2;int y=3;printf("%d",prod(x+2,y-10)); }the output of t...
answer is -2 so none is answer
 
Is this answer useful? Yes | No
February 10, 2006 17:13:33   #2  
laxmikanth        

RE: # define prod(a,b)=a*bmain(){int x=2;

First of all the program is not executed at all how can we expect the answer.

There is an error in the macro defination i.e = symbol in macro body.in the printf this (=)will be substitued and that will causes an error saying that some syntax error.

if = is not there in macro body then the result is -2 which is none of the given options.


 
Is this answer useful? Yes | No

 Related Questions

Main must be written asa.the first function in the programb.Second function in the programc.Last function in the programd.any where in the program

Which of the following about automatic variables within a function is correct ?a.its type must be declared before using the variableb.they are localc.they are not initialised to zerod.they are global.

Write one statement equivalent to the following two statementsx=sqr(a);return(x);Choose from one of the alternativesa.return(sqr(a));b.printf("sqr(a)");c.return(a*a*a);d.printf("%d",sqr(a));

Which of the following is not an infinite loop ?a.while(1){....}b.for(;;){...}c.x=0;do{/*x unaltered within the loop*/...}while(x==0);d.# define TRUE 0while(TRUE){....}

What does the following function print?func(int i){if(i%2)return 0;eale return 1;}main(){int =3;i=func(i);i=func(i);printf("%d",i);}a.3b.1c.0d.2

Read the folllowing code# define MAX 100# define MIN 100........if(x>MAX)x=1;else if(x

A memory of 20 bytes is allocated to a string declared as char *sthen the following two statements are executed:s="Etrance"l=strlen(s);what is the value of l ?a.20b.8c.9d.21

Given the piece of codeint a[50];int *pa;pa=a;to access the 6th element of the array which of the following is incorrect?a.*(a+5)b.a[5]c.pa[5]d.*(*pa + 5)

Consider the following structure:struct num nam{int no;char name[25];};struct num nam n1[]={{12,"Fred"},{15,"Martin"},{8,"Peter"},{11,Nicholas"}};..........printf("%d%d",n1[2],no,(*(n1 + 2),no) + 1);What does the above statement print?a.8,9b.9,9c.8,8d.8,unpredictable value

Regarding the scope of the varibles;identify the incorrect statement:a.automatic variables are automatically initialised to 0b.static variables are are automatically initialised to 0c.the address of a register variable is not accessiabled.static variables cannot be initialised with any expression


 Sponsored Links

 
Related Articles

How to Best Use Business Intelligence to Your Advantage

How to Best Use Business Intelligence to Your Advantage It is no big secret that today s businesses rely heavily on data and the information it delivers about their companies Whether it is for the purpose of customer acquisition improving operational performance or understanding competitors all of t
 

Taking Advantage of Standard Internet Protocols

Taking Advantage of Standard Internet Protocols As mentioned Oracle XML DB provides native support for standard internet protocols such as S WebDAV and Continuing with the preceding sample you might for example upload another employee XML document into the XML repository with one of the above prot
 

Accessing Repository Resources with SQL

Accessing Repository Resources with SQL In fact Oracle XML DB repository resources are stored in a set of database tables and indexes which can be accessed via SQL You are not supposed to access those tables directly Instead Oracle XML DB provides two public views RESOURCE VIEW and PATH VIEW through
 

XML Processing in PHP and Oracle Applications

Processing XML in PHP Oracle Applications As mentioned there are two alternatives when it comes to performing XML processing in your PHP Oracle application You can perform any required XML processing using either PHP s XML extensions or PEAR XML packages or Oracle s XML features mosgoogle In the fol
 

Business Intelligence Applications

Business Intelligence Applications In this article we are going to take some time to discuss the various applications that are normally provided with Business Intelligence Systems mosgoogle Tools Used to Analyze Performance Projects and Internal Operations First we will look over the tools most comm
 

Business Intelligence Data Analysis

Business Intelligence Data Analysis Data Analysis Data Analysis is a complete and thorough review of all of the information being collected and warehoused by an organization This is most commonly done by organizing and examining the data collected with the help of charts graphs and tables mosgoogle
 

SQA Approaches and Methodologies

SQA Approaches and Methodologies A scientific approach should have methods As a scientific process a stage or a step should be established or used to ensure the final product is according to the user’ s specifications The method is usually determined through the wishes of the clients the a
 

SQA Analysis

SQA Analysis Software Quality Assurance is all about analysis One of the major purposes of this discipline is to know the inner workings of an application To do this careful analysis has to be exercised at all times Although there are programs and applications that aid in knowing the inner workings
 

What is Software Quality Assurance?

What is Software Quality Assurance Business software is never built overnight It takes a lot of planning consultation and testing to be able to come up with an initial version of the application If a business hurries up the development of a certain application they would end up spending more in addr
 

Software Quality Assurance Training

Software Quality Assurance Training In this training session you will learn about SQA Software Quality Assurance SQA Principles SQA Planning SQA Project Metrics SQA Software and Tools SQA Analysis SQA Approaches and Methodologies SQA Planning and Requirements SQA Lifecycle Standards SQA Implementati
 





About Us  |   Privacy Policy  |   Terms and Conditions  |   Contact  |   Site Map  |   Add Question  |   Propose Category  |   RSS Feeds  |   Articles Sitemap  |   Site Updates  |   Add Resource

Copyright © 2005 - 2008 GeekInterview.com. All Rights Reserved
Page copy protected against web site content infringement by Copyscape