473,385 Members | 1,907 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,385 software developers and data experts.

what's the error ??

What is the error.. ??

#include <stdio.h>

int main()
{
int a,b,c;
switch(switch(a=4,b=8,c,c=0)+5)
{
case 4: printf("We are foolish\n");
case 8: printf("But\n");
case 0: printf("U r brainy");
}
return 0;
}
Jan 14 '08 #1
6 1184
asit <li*****@gmail.comwrites:
switch(switch(a=4,b=8,c,c=0)+5)
Among other problems, switch is not an operator, so you cannot
use it within an expression.
--
"I hope, some day, to learn to read.
It seems to be even harder than writing."
--Richard Heathfield
Jan 14 '08 #2
asit wrote:
What is the error.. ??

#include <stdio.h>

int main()
{
int a,b,c;
switch(switch(a=4,b=8,c,c=0)+5)
{
case 4: printf("We are foolish\n");
case 8: printf("But\n");
case 0: printf("U r brainy");
}
return 0;
}
Please get a decent book on C and work your way through it. You don't
have the slightest idea how to use most of the things you try.

You waste your time and ours.

Brian
Jan 14 '08 #3
>>>>"a" == asit <li*****@gmail.comwrites:

aWhat is the error.. ??

Not including, in your request, a description of the expected behavior
and why you expect it and the behavior you actually see.

Charlton

--
Charlton Wilbur
cw*****@chromatico.net
Jan 14 '08 #4
asit <li*****@gmail.comwrote:
What is the error.. ??
The error is you believing that comp.lang.c is a do-my-homework service.
It is not. Do your own bleedin' homework, Jock.

Richard
Jan 15 '08 #5
Richard Bos wrote:
asit <li*****@gmail.comwrote:
>What is the error.. ??

The error is you believing that comp.lang.c is a do-my-homework service.
It is not. Do your own bleedin' homework, Jock.

Richard
Time for a plonk methinks...
Jan 15 '08 #6
asit wrote:
What is the error.. ??

#include <stdio.h>

int main()
{
int a,b,c;
switch(switch(a=4,b=8,c,c=0)+5)
{
case 4: printf("We are foolish\n");
case 8: printf("But\n");
case 0: printf("U r brainy");
}
return 0;
}
What does your compiler say?
Jan 15 '08 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

72
by: E. Robert Tisdale | last post by:
What makes a good C/C++ programmer? Would you be surprised if I told you that it has almost nothing to do with your knowledge of C or C++? There isn't much difference in productivity, for...
4
by: atv | last post by:
Whatis the proper way to handle errors from function calls? For example, i normally have a main function, with calls to mine or c functions. Should i check for errors in the functions called...
6
by: Daniel Rudy | last post by:
What is wrong with this program? When I try to compile it, I get the following error. Compiler is gcc on FreeBSD. strata:/home/dcrudy/c 1055 $$$ ->cc -g -oe6-3 e6-3.c e6-3.c: In function...
13
by: Jason Huang | last post by:
Hi, Would someone explain the following coding more detail for me? What's the ( ) for? CurrentText = (TextBox)e.Item.Cells.Controls; Thanks. Jason
10
by: Protoman | last post by:
Could you tell me what's wrong with this program, it doesn't compile: #include <iostream> #include <cstdlib> using namespace std; class Everything { public: static Everything* Instance()
669
by: Xah Lee | last post by:
in March, i posted a essay “What is Expressiveness in a Computer Language”, archived at: http://xahlee.org/perl-python/what_is_expresiveness.html I was informed then that there is a academic...
4
by: brian | last post by:
i broke down where i think the problems areas would be. any help would be greatly appreciated. where the file is called <script type="text/javascript" src="k.js"> </script> the beginning...
4
by: grizggg | last post by:
I have searched and not found an answer to this question. I ran upon the following statement in a *.cpp file in a member function: static const char * const pacz_HTMLContentTypeHeader =...
9
by: Trent | last post by:
Here is the error while using Visual Studio 2005 Error 1 error LNK2019: unresolved external symbol "void __cdecl print(int,int,int,int,int,int,int,int)" (?print@@YAXHHHHHHHH@Z) referenced in...
5
by: =?GB2312?B?17/HvyBaaHVvLCBRaWFuZw==?= | last post by:
Hi, I would like to have someone comments on what's the best practice defining error codes in C. Here's what I think: solution A: using enum pros: type safe. better for debug (some debugger...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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:
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.