GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Placement Papers  >  Oracle  >  Technical
Go To First  |  Previous Question  |  Next Question 
 Technical  |  Question 7 of 126    Print  
int z;
int x = 5;
int y = -10;
int a = 4;
int b = 2;
z = x++ - --y * b /a;
What number will z in the sample code above contains

A. 5
B. 6
C. 10
D. 11


  
Total Answers and Comments: 2 Last Update: March 26, 2007   
  
 Sponsored Links

 
 Best Rated Answer
Submitted by: umesh_singh
 
execution starts from right hand side  since * and / has higher priority
1) so b/a(of type int)=2/4=0
2)--y * (b/a)  =0
3)x++ is post incrementer so answer is
                                                                5



Above answer was rated as good by the following members:
itclanster
July 24, 2005 10:55:53   
Vijaya Bhaskar M        

RE: int z;int x = 5;int y = -10;int a = 4;int b = 2;z = x++ - --y * b /a;What number will z in the sampl...
Here the evaluation of expression starts from right side of the statement. so all variables are of type integer..so the b/a which is float result so it will be taken as zero. and finally we will get the answer as 10
 
Is this answer useful? Yes | No
March 26, 2007 02:23:12   
umesh_singh Member Since: February 2007   Contribution: 6    

RE: int z;int x = 5;int y = -10;int a =...
execution starts from right hand side since * and / has higher priority
1) so b/a(of type int) 2/4 0
2)--y * (b/a) 0
3)x++ is post incrementer so answer is
5


 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    

 Related Questions

Int z;int x = 5;int y = -10;int a = 4;int b = 2;z = x++ - --y * b /a;What number will z in the sample code above containsA. 5B. 6C. 10D. 11

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

Int x[] = { 1, 4, 8, 5, 1, 4 };int *ptr, y;ptr = x + 4;y = ptr - x;What does y in the sample code above equal?A. -3B. 0C. 4D. 4 + sizeof( int )

#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

The limit for the number of parameters for a pl/sql procedure isA. 256B. No Limit at allC. Depends on the type of parameters passed to the procedureD. Depends on Positional Parameters passed.

A certain number of men can finish a piece of work in 10 days. If however there were 10 men less it will take 10 days more for the work to be finished. How many men were there originally?A. 110 menB. 130 menC. 100 menD. none of these

What is the use of a make fileA. Do detect memory leakageB. To optimize the codeC. To link and compile source code to exeD. To disassemble the exe to source code

To produce a meaningful result set without any cartesian products, what is the minimum number of conditions that should appear in the WHERE clause of a four-table join?A. 8B. 3C. 4D. 5


 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
 

jQuery Table Row Finished Code

jQuery Table Row Finished Code The Finished Code Our second example page has demonstrated table row striping highlighting tooltips collapsing expanding and filtering Taken together the JavaScript code for this page is mosgoogle geshibot lang php&quot; document ready function var highlighted
 

jQuery Interacting with Other Code

jQuery Interacting with Other Code We learned with our sorting and paging code that we can t treat the various features we write as islands The behaviors we build can interact in sometimes surprising ways; for this reason it is worth revisiting our earlier efforts to examine how they coexist with t
 

jQuery Completed sorting and paging code

Learning jQuery The Finished Code The completed sorting and paging code in its entirety follows mosgoogle geshibot lang php&quot; fn alternateRowColors function tbody tr odd this removeClass even addClass odd ; tbody tr even this removeClass odd addClass even ; return this; ; document
 

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