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 26 of 99    Print  
what will be the output of the following question
#include
main()
{
int i=90,k,l;
k=i%-3;
l=-i%3;
printf("%d",k+l);
}



Zero


  
Total Answers and Comments: 1 Last Update: May 15, 2007     Asked by: pavankishore 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
May 15, 2007 06:01:54   #1  
Mr Singh        

RE: what will be the output of the following question
Ans K+l =0
 
Is this answer useful? Yes | No

 Related Questions

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 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

Latest Answer : In c every function by default returns an integer value. By using void we mean a value zero is return to the environment i.e., operating system. ...
Read Answers (3) | Asked by : mohammed arif

Latest Answer : There is no need of declaring the function main() as it is already known to compiler .main() is a function from where the execution starts. ...
Read Answers (1) | Asked by : Richa

I have a class defined belowclass A{ int *m_ptr; A(){}};main(){ int *loc_ptr; A a1,a2;}I have to write a copy constructor for this classPlease help in this problemThanks in Advance.
View Question | Asked by : Ravikannan

What is the output of the following program#includevoid main(){printf("%d%d",sizeof('a'),sizeof("a"));

What will be the output of the following question#includemain(){int i=90,k,l;k=i%-3;l=-i%3;printf("%d",k+l);}
Zero 

int *ptr = (int *)malloc(100*(sizeof(int)));ptr++;free(ptr); 
Latest Answer : it will allocate 200 bytes of memory and returns pointer to the first location...correct me if iam wrongregardsumesh ...

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

Concepts of Object-Oriented Programming

Object Oriented JavaScript In this chapter you ll learn about OOP Object Oriented Programming and how it relates to JavaScript As an ASP NET developer you probably have some experience working with objects and you may even be familiar with concepts such as inheritance However unless you re already a
 

C++ Standard Input Output Stream

C Standard Input Output Stream In this C tutorial you will learn about standard input stream and standard output stream explained along with syntax and examples C programming language uses the concept of streams to perform input and output operations using the keyboard and to display information on
 

printf() Function Return Value

What is the return value from printf() function? printf function always returns the number of characters printed. Let us understand this with an example: main() { int a=10; printf("%d",printf("%d %d %d", a,a,a)); } In this above program the inner printf i
 

How is the main() function declared?

The declaration of main can be done as int main() One more declaration that can be taken by main is command line arguments form int main(int argc, char *argv[]) or this can also be written as int main(argc, argv) int argc; char *argv[]; NOTE: It is not possible for one to declare the main
 

What happens when a variable is not initialized in main function?

When a variable is not initialized in main function it contains garbage value. This can be well seen from the example below main() { int x; printf(“%d”,x); z= sample() } sample() { printf(“Testing program”); } Output is   &n
 

What are the Format Specifiers used with printf?

There are several format specifiers available in printf. The format specifier used varies depending on the data type used for printing. The given below are some of the format specifiers used with printf in C program. For integer data type the format specifier used with printf is %d or %i For float
 

printf and sprintf

What is the difference between printf and sprintf? sprintf: Writes formatted data to a character string in memory instead of stdout Syntax of sprintf is: #include <stdio.h> int sprintf (char *string, const char *format [,item [,item]...]); Here, String refers to the pointer to a
 

SQL Programming

SQL Programming Overview Anybody who has done something for a long time has probably wanted to change how things work at some point or another. A worker at a mill might have found a more efficient way of cutting logs, or a mathematics teacher might have had a hand in changing a school’s al
 

WinRunner Programming Concepts

If you want to create WinRunner scripts that are highly efficient, there are important programming concepts that you will want to become familiar with. Understanding these concepts will provide you with a large number of key benefits. In addition to understanding these concepts, you must also learn
 

Programming Languages Certification

IT Certification programs have several options that will offer you the best knowledge.  By learning everything that you need to know about information technology you will be able to open new doors to your career and personal business desires.  IT Certification offers several vari
 





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