what the values of the following expressions: if illegal or unpredictable
please state so.
stat char *arrax ="C is my favourite";
stat char *lp=arrax;
static int five=5;
a)*(arrax + 8)
b)*arrax+2
c)lp[10]
d)12[arrax\ 8 1175
"t3hseen" <t3*****@yahoo. com> wrote in message
news:3e******** *************** *******@localho st.talkaboutpro gramming.com... what the values of the following expressions: if illegal or unpredictable please state so.
stat char *arrax ="C is my favourite"; stat char *lp=arrax; static int five=5;
a)*(arrax + 8) b)*arrax+2 c)lp[10] d)12[arrax\
Homework?
t3hseen wrote: what the values of the following expressions: if illegal or unpredictable please state so.
stat char *arrax ="C is my favourite";
Undefined symbol "stat". Thus illegal.
stat char *lp=arrax;
Undefined symbol, "stat". Thus illegal.
Symbol "arrax" is undefined.
static int five=5;
Valid.
But why is everything static? Hmmmm.
Actually, the "static" has nothing to
do with legality or predictability of
the next expressions. a)*(arrax + 8)
Undefined symbol "arrax", due to syntax
error.
See also arrax[8].
b)*arrax+2
Undefined symbol "arrax", due to syntax
error.
See also arrax[0] + 2.
c)lp[10]
Undefined symbol "lp", due to syntax
error.
Since lp == arrax, expression is the
same as arrax[10].
d)12[arrax\
"Unexpected end of file encountered",
due to '\' at end of line.
This one, and the others, are in a C
and C++ textbook as well as the FAQ.
See below.
--
Thomas Matthews
C++ newsgroup welcome message: http://www.slack.net/~shiva/welcome.txt
C++ Faq: http://www.parashift.com/c++-faq-lite
C Faq: http://www.eskimo.com/~scs/c-faq/top.html
alt.comp.lang.l earn.c-c++ faq: http://www.comeaucomputing.com/learn/faq/
Other sites: http://www.josuttis.com -- C++ STL Library book http://www.sgi.com/tech/stl -- Standard Template Library
"t3hseen" <t3*****@yahoo. com> wrote in message
news:eb******** *************** *******@localho st.talkaboutpro gramming.com... yes http://www.parashift.com/c++-faq-lite
(see esp. section 5.2)
t3hseen wrote: yes
Give me your instructor's email, so I can save you the trouble of
submitting it yourself, since you don't want to do the work.
"t3hseen" <t3*****@yahoo. com> wrote in message
news:eb******** *************** *******@localho st.talkaboutpro gramming.com... yes
As you can see from the responses, you were doomed once you decided to be
honest.
BTW, people are far more inclined to help if you try to answer the questions
yourself and post the work you've done.
DW
guys, thanks for the help you have provided, i apologize if you thought i
was trying to GET you to do my hw, for i did not know to post what i
thought it was as well,
more importantly i appreciate the links to the tutorials, faq sections This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Mark |
last post by:
Hello. I am new to programming and Python and was wondering if someone
could help get me started. I picked Python to start learning to prgram
because of some things I have read about it (easy to learn, object
oriented, clear syntax, etc...). Can anyone assist in getting me
started with learning to program and Python? Recommended reading
material? Online tutorials? Recommended development tools (wxpython,
pythonwin, etc...)? I am a...
|
by: noone |
last post by:
Hello all,
I am absolutely brand new to perl, but I understand that it is a very
important aspect of web development to create dynamic web pages.
I am kind of short on money, being a college student and all, and I have
looked at several bookstores for books about perl and:
1. I don't know what topics I should be looking for to learn the basics
of the perl language.
2. Most of the books are too much for me to shell out right now...
|
by: DrUg13 |
last post by:
In java, this seems so easy. You need a new object
Object test = new Object() gives me exactly what I want.
could someone please help me understand the different ways to do the
same thing in C++. I find my self sometimes, trying
Object app = Object();
Object *app = Object();
Object app = new Object();
|
by: Turamnvia Suouriviaskimatta |
last post by:
I 'm following various posting in "comp.lang.ada, comp.lang.c++ ,
comp.realtime, comp.software-eng" groups regarding selection of a
programming language of C, C++ or Ada for safety critical real-time
applications. The majority of expert/people recommend Ada for safety
critical real-time applications. I've many years of experience in C/C++ (and
Delphi) but no Ada knowledge.
May I ask if it is too difficult to move from C/C++ to Ada?...
|
by: tjones |
last post by:
Hi, I am guessing this is *THE* nntp newsgroup for C#?
I was hoping someone could point me in the right direction. Id like to find
employment in the IT industry as a programmer again. My background is a mix
of programming and networking. I have fairly decent skills in C++, Java and
ADA. I have been working as a network engineer on all flavours of windows,
lots of unix, mssql, cisco and others. Currently finishing a master of
science...
| |
by: Mike |
last post by:
Hi,
I am planning on purchasing VS2005 to learn C# very soon, and I need good
book recommendations. I realize this is a question that may be asked a lot,
but please consider my background:
I have been a ClassicVB/ASP programmer for about 7 years. I have never done
anything with .NET and only have a very basic understanding of the platform.
Recently, I started working on a large JAVA project at my job (even though I
have very little...
|
by: Samineni |
last post by:
Welcome to comp.lang.c++! Read this first.
This post is intended to give the new reader an introduction to reading
and posting in this newsgroup. We respectfully request that you read
all the way through this post, as it helps make for a more pleasant
and useful group for everyone.
First of all, please keep in mind that comp.lang.c++ is a group for
discussion
of general issues of the C++ programming language, as defined by the
|
by: 1jasong |
last post by:
Hello I am new to programming and want to know what is a good free
compiler is. I am asking this because there are so many of them and I
just want to start programming also a good website for programming to
help me, I want to major in the computer programming field and want to
know if there are any really good tutorial sites. Thanks your input
is much appriciated.
|
by: Dann Corbit |
last post by:
Rather than create a new way of doing things:
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2497.html
why not just pick up ACE into the existing standard:
http://www.cse.wustl.edu/~schmidt/ACE.html
the same way that the STL (and subsequently BOOST) have been subsumed?
Since it already runs on zillions of platforms, they have obviously worked
most of the kinks out of the generalized threading and processes idea (along
with many...
|
by: blangela |
last post by:
Bjarne Stroustrup has a new text coming out called "Programming:
Principles and Practice Using C++" (ISBN: 0321543726), due to be
published in December of this year.
Some of the features of this new text include:
*Its history: The text was developed in the author's introductory
programming course at Texas A&M and has been used successfully by
hundreds of students.
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |