GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Placement Papers  >  Oracle  >  Technical
Go To First  |  Previous Question  |  Next Question 
 Technical  |  Question 47 of 126    Print  
What is the output?
void main()
{
int a,b=5,c=10;
a = (b-c) > (c-b) ? b : c;
printf("%d",a);
}

A. 10
B. 5
C. 0
D. Error


  
Total Answers and Comments: 1 Last Update: August 02, 2005   
  
 Sponsored Links

 
 Best Rated Answer
Submitted by: priya
 
Answer is 10

Above answer was rated as good by the following members:
adeshgupta, ganeshbhat
August 02, 2005 08:41:23   
priya        

RE: What is the output?void main(){int a,b=5,c=10;a = (b-c) > (c-b) ? b : c;printf("%d",a);...
Answer is 10
 
Is this answer useful? Yes | NoAnswer is useful 2   Answer is not useful 0Overall Rating: +2    

 Related Questions

F = fopen( filename, "r" );if(????){fprintf(stderr, "Could not open file!");exit(-1);}What should replace the ???? in the code above to determine if the file could not be opened?A. f == NULLB. f == EOFC. f != 0;D. f == -1

#include void func(){int x = 0;static int y = 0;+; y++;printf( "%d -- %dn", x, y );}int main(){func();func();return 0;}printf("%dn", 64>>3);What will the sample code above produce when executed?A. 8B. 16C. 32D. 256

What is the output of the following code?char str[20] = "ENIGMA";char *p, *q, *r;q=p++;r=p+3 - (p-q);printf("%3s%5s", (++p)+3, r);A. ENIGMAB. GMAC. No outputD. Error.

#include void inc_count(int count){count ++;}int main(){int count = 0; /* number of times through */while (count < 10)inc_count(count);return count ;}What will be the value returned by the function main?A. 0B. 10C. 9D. Null

What is the correct way to define a constant pointer?A. const char *name_ptr = "TEST";B. char *const name_ptr = "TEST";C. Both A and BD. None of Above.
Tags : Pointer

Difference between %TYPE and %ROWTYPEA. %ROWTYPE used to declare the field and %TYPE used to declare the recordB. %ROWTYPE used to declare the record and %TYPE used to declare the fieldC. BOTH ARE SAMED. %ROWTYPE gives an error.

Select 'oracle' from dual where null = null;A. oracleB. nullC. error outD. no rows selected

What is the difference between the two declarations?#include &#include "stdio.h"A. No differenceB. The second declaration will not compileC. First case compiler looks in all default location and in 2nd case only in the working directoryD. Depends on the compiler

How can I print a "%" character in a in between the string foo and the value held in the variable foo using printf format string?A. fprintf("foo " "%" "%dn", foo);B. fprintf("foo '%' %dn", foo);C. fprintf("foo % %dn", foo);D. fprintf("foo " "%dn", foo);

#include #define FIRST_PART 7#define LAST_PART 5#define ALL_PARTS FIRST_PART + LAST_PARTint main() {printf ("The Square root of all parts is %dn , ALL_PARTS * ALL_PARTS) ;return(0);} A. 35B. 144C. 
Latest Answer : @ mef526 - You have added the brackets yourself. Those brackets make a huge difference. the answer is 47. ...


 Sponsored Links

 
Related Articles

Querying Data with Oracle XQuery

Querying Data with Oracle XQuery Starting with Oracle Database 10g Release 2 you can take advantage of a full featured native XQuery engine integrated with the database With Oracle XQuery you can accomplish various tasks involved in developing PHP Oracle XML applications operating on any kind of dat
 

Using Oracle XML DB Repository

Using Oracle XML DB Repository Another variation on accessing and manipulating XML content stored in Oracle database is provided by Oracle XML DB repository which is an essential component of Oracle XML DB mosgoogle NOTE Oracle XML DB repository also known as XML repository is a hierarchically organ
 

Using Oracle Database for Storing, Modifying, and Retrieving XML Data

Using Oracle Database for Storing Modifying and Retrieving XML Data With Oracle XML DB you have various XML storage and XML processing options allowing you to achieve the required level of performance and scalability One of the most interesting things about Oracle XML DB is that it allows you to per
 

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
 

PHP Oracle Web Development

PHP Oracle Web Development Data processing Security Caching XML Web Services and Ajax The book is written by Yuli Vaseliev a well known author of different web development and programming books PHP Oracle Web Development Data processing Security Caching XML Web Services and Ajax is a good starting b
 

Getting Started with Oracle and ODP.NET

ODP NET Developer&rsquo; s Guide by Jagadish Chatarji Pulakhandam Sunitha Paruchuri A practical guide for developers working with the Oracle Data Provider for NET and the Oracle Developer Tools for Visual Studio 2005 Application development with ODP NET Dealing with XML DB using ODP NET Oracle
 

PHP Oracle Web Development Review

PHP Oracle Web Development Data processing Security Caching XML Web Services and Ajax The book is written by Yuli Vaseliev a well known author of different web development and programming books The author is also an expert in open source technologies and SOA Service Oriented Architecture But besides
 

Step by Step Oracle PL-SQL Tutorial

This introductory tutorial to PL SQL will help you to understand the basic concepts of PL SQL Please review the following tutorials and practice the sample SQL Statements on your local Oracle Database Please note that you must learn these basic things before we actually start getting in to Advanced
 

C++ Void Pointer and Null Pointer

C Void Pointer and Null Pointer In this C tutorial you will learn about two interesting types of pointers; void pointers and Null Pointer These pointers will be discussed in conjunction with syntax usage and example mosgoogle center Pointer to Void General Syntax void pointer variable; Void is use
 

Working with XML in Oracle

Working with XML in Oracle Introduction to XML Extensive markup language is the language which presents data in a human readable form of text The data can be anything from a purchase order or a stock quote or weather radar or a flight schedule it can be represented using XML XML is very similar to H
 

About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2010 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape