473,386 Members | 1,699 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

what's the output of this program ?

1
hi, this is vidya,
i have a doubt regarding the output of this program
Expand|Select|Wrap|Line Numbers
  1. main()
  2. {
  3. int c;
  4. c=300*300/300;
  5. printf("%d",c);
  6. }
  7.  
the output is?
Feb 6 '08 #1
8 2105
Ganon11
3,652 Expert 2GB
Why can't you run it yourself?
Feb 6 '08 #2
sicarie
4,677 Expert Mod 4TB
hi, this is vidya,
i have a doubt regarding the output of this program
Expand|Select|Wrap|Line Numbers
  1. main()
  2. {
  3. int c;
  4. c=300*300/300;
  5. printf("%d",c);
  6. }
the output is?
Nothing. That's not a complete program.
Feb 6 '08 #3
Im sorry to day this sriya....
If u dont know wat the output of such a simple program is....
Then i suggest u forget learnin C ,and move On....
Feb 7 '08 #4
Im sorry to day this sriya....
If u dont know wat the output of such a simple program is....
Then i suggest u forget learnin C ,and move On....
You should feel sorry....no one is expert in anything ... what is the output of this program...
Expand|Select|Wrap|Line Numbers
  1. #include<iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6.   long quo = 24 * 60 * 60 * 1000;
  7.   long div = 24 * 60 * 60 * 1000*1000;
  8.  
  9.   cout<<div/quo;
  10. }
  11.  
May be programming is new to her ...

anyway, the above code is taken from a popular java puzzle.
Feb 7 '08 #5
sicarie
4,677 Expert Mod 4TB
gunner666-

That is not acceptable behavior on theScripts. While sriya might not know the output of basic programs, I'm willing to bet you didn't either until you learned what the basic IO and control structures were.

So please confine yourself to helpful, or at least constructive criticisms.

sicarie
Feb 7 '08 #6
Geekibz
12
<removed>.Or is there more to it than just that?
Feb 8 '08 #7
rajudo
1
81
maximum integer length is - 32767 to 32768.
May 10 '13 #8
lego13
3
The output is 300 .
May 10 '13 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Yuan HOng | last post by:
In my program I have to call an external program and parse its output. For that I use the os.popen2 function, and then read the output stream. But the complexity is that the external program...
0
by: Keith Dick | last post by:
I'm trying to use the free command line C/C++ compiler for .NET and when I try to debug a simple C program that uses printf(), I don't see the output it produces. A console window does open when...
1
by: hitendra | last post by:
wats eauivalent of IIF in C#?
2
by: JezB | last post by:
I'm compiling an old C program within Visual Studio to give me the advantages of debugging within this environment. I'm building it as a Console application using C++ as the language. It compiles...
1
by: noleander | last post by:
Hi. I've got a C++ program written in Visual C++ 2003. The program is trivial, created with the Program-creation wizard: used the .NET "Form" template. The program has a trivial...
4
by: Kevin Mansel via .NET 247 | last post by:
Ok, basically this is my problem. I'm building a console app tocall a dos program. So i'm using the Shell command to call theprogram, now depending on what happens, I want to read theoutput that...
0
by: Nishit | last post by:
wats the difference between debuggin and compiling?
2
by: flavourofbru | last post by:
Hi, I am reading a text file which has 4 columns into a 3D array. My code is compiling........but cant see the output. Shows .exe file stopped working. My code is as follows: //#include...
87
by: pereges | last post by:
I have a C program which I created on Windows machine. I have compiled and executed the program on windows machine and it gives me the consistent output every time i run it. for eg. input a = 2,...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.