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  >  Tech FAQs  >  Programming  >  C
Go To First  |  Previous Question  |  Next Question 
 C  |  Question 32 of 97    Print  
Given specification:
if (x >2)
then print 2*x;
else print 2+x,
where x is an integer variable. From the perspective of blackbox testing, discuss whether the following implementation is faulty
if (x>=2) print (2*x) ;
else print (2+x);

  
Total Answers and Comments: 0 Last Update: March 09, 2007     Asked by: northwest 
  
 Sponsored Links

 

No answers are posted for this question yet.
Be the first to answer it!


 Related Questions

I want to convert a string (ex: 567.2.2.2) into integer or array of integer and i have to check 567 is greater then or less than 256 or not and i have to dispaly. this string is in a file

Write a program that would input integer from 40-127 and output the equivalent octal hexadecimal value.
Read Answers (2) | Asked by : save_you

Q1. write a program to find a given number is armstrong number or not ?Q2write a program which accepts a filename as a command line argument and reverse the contents of the file(i.e first character becomes the last character of the file and so on ?Q3 how can i call a function given its name as a string ?Q4 How to swap low-order byte and high order byte in an integer without using temporary variable?Q5 If we develop a project in C, then how can we create an .exe file of it?Q6 how to print 1 to 100
please let me know the answers to my email address as i having the interview in TCS so please please please please let me know  
Read Answers (15) | Asked by : M.srilatha

Q1 How to swap Low-order byte and high order byte in an integer without using temporary variable ?Q2 write a program to print numbers from 1 to 100 without using any condition checking ?Q3 If we develop a project in C,then how can we create an .exe file of it?Q4 Write a program which accepts a filename as a command like argument and reverse the contents of the file (i.e firs character becomesthe last character of the file and so on)input: the program takes the file name whose content should be
Read Answers (7) | Asked by : M.srilatha

Char str[]="DOLLAR";Here , you have the base address of array i.e. str.By using only one pointer variable, you have to replace the occurrence of 'L' with '$$'. (after replacement, it should be DO$$$$AR)can any body suggest efficient method?
Read Answers (2) | Asked by : pavan kumar reddy
Tags : Pointer

Should the code below keep grabbing more resources as a variable is declared inside a while loop?while(1){int i = 10;while(--i);}How does a while loop exactly work? can any explain me the same?

Given specification: if (x >2) then print 2*x; else print 2+x, where x is an integer variable. From the perspective of blackbox testing, discuss whether the following implementation is faulty if (x>=2) print (2*x) ;else print (2+x);
View Question | Asked by : northwest

View Question | Asked by : P. Mukherjee

How a variable value is stored and retrieved at runtime in C?for example main(){ int a; a=5; }Where is the value of 'a' stored and How it is retrieved at runtime?

main{int x=90;float *ptr;ptr=(float *)&x;*ptr=50.0;printf("%d",x);printf("%f",*pf);}Though the address of i & pf are same but the value which i get when i print x is a different integer 
Latest Answer : It is always helpful to write valid code.  Your example would not compile and the output would not be readable.1:    int x = 90;2:    float* ptr;3:    ptr = (float*)&x;4:    *ptr = 50.0f;            ...
Read Answers (1) | Asked by : chitraj


 Sponsored Links

 
Related Articles

WLAN quality-of-service specification approved

IEEE 802.11e standard for priority on wireless LANs has won final approval, with four proposed traffic classes: voice, video, best effort and background.
 

Wireless LAN group publishes draft specification

The group of 27 technology companies is collaborating on a new, faster Wi-Fi wireless Internet standard for computers and other portable devices after another standards-setting effort bogged down.
 

Developing to the Java Portlet Specification

By Michael Klaene Go to page: 1 2 Next In my last article, " Understanding the Java Portlet Specification ," I introduced to the main concepts behind the Java Portlet Specification, JSR-168. This article will walk through the development of a simple portlet application to demonstrate the i
 

Understanding the Java Portlet Specification

By Michael Klaene Go to page: 1 2 Next In recent years, many organizations have implemented an enterprise portal to host internal and external applications. There are numerous J2EE portal vendors offering products in this lucrative market. In the past, each of these portal offerings defined their ow
 

The Java Virtual Machine Specification

The Java virtual machine specified here will support the Java programming language specified in The JavaTM Language Specification (Addison-Wesley, 1996). It is compatible with the Java platform implemented by Sun's JDK releases 1.0.2 and 1.1 and the JavaTM 2 platform implemented by Sun's Jav
 

The Java Language Specification

This book attempts a complete specification of the syntax and semantics of the language. We intend that the behavior of every language construct is specified here, so that all implementations will accept the same programs. Except for timing dependencies or other non-determinisms and given sufficient
 

Java 3D API Specification

THIS document describes the Java 3D API, version 1.2, and presents some details on the implementation of the API. This specification is not intended as a programmer's guide. This specification is written for 3D graphics application programmers. We assume that the reader has at least a rudimentar
 

Article :: The Standard Tag Library in the JSP Specification

Although the standard tag library is not technically a portion of the JSP specification, they are closely related, and can be used in any application server that supports JSPs. Discover what these tags can do, in this sample chapter from JavaServer Pages. n
 

Updated Specification for Web Services Discovery (WS-Discovery)

This update to the WS-Discovery spec is based on workshop and partner feedback.
 

XPS Documents: A First Look at APIs For Creating XML Paper Specification Documents

Windows Vista includes improved document technology called the XML Paper Specification that is designed to provide users with a consistent document appearance regardless of where and how the document is viewed. Here Bob Watson explains.
 





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