Search the web
Sign In
New User? Sign Up
cprogramming2 · C Programming Turning caffeine into code
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want your group to be featured on the Yahoo! Groups website? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Messages 8798 - 8829 of 8829   Oldest  |  < Older  |  Newer >  |  Newest
Messages: Show Message Summaries   (Group by Topic) Sort by Date ^  
#8798 From: "nico_heinze" <grollnar@...>
Date: Thu Oct 29, 2009 7:30 pm
Subject: Re: Opening and creating Text files for reading by an application using Visual C E
nico_heinze
Offline Offline
Send Email Send Email
 
--- In cprogramming2@yahoogroups.com, sempaiga <no_reply@...> wrote:
>
> I need to open a text file that my compression application
> I am coding should read. when I create a  text file in the
> compiler itself ( its name was given by the compiler itself
> as (TextFile1.txt)) and fill it with text to be read by the
> program I have written , the application comes back with the
> message."sourcefile is empty of any data" or "cannot open the
> source file".
<snip>

Please post the smallest piece of code which shows this behaviour, only then can
we try to help you. Without seeing your code there's no use in guessing what may
be wrong.

Regards,
Nico

#8799 From: "alaaziz64" <alaaziz64@...>
Date: Wed Oct 28, 2009 4:56 pm
Subject: project
alaaziz64
Offline Offline
Send Email Send Email
 
hi all
i work on project
one part is to write a c program that read my yahoo email
can any  1 help me in this

#8800 From: Reid Thompson <jreidthompson@...>
Date: Thu Oct 29, 2009 10:52 pm
Subject: Re: [C Programming] project
jreidthompson
Online Now Online Now
Send Email Send Email
 
alaaziz64 wrote:
>
>
> hi all
> i work on project
> one part is to write a c program that read my yahoo email
> can any 1 help me in this
>

google for pop3 email C/C++ libraries and how to use them
if you can access your yahoo email via imap, you can also google for imap C/C++
libraries and how to use them

#8801 From: auralius <mr_manurung@...>
Date: Fri Oct 30, 2009 12:49 am
Subject: Re: [C Programming] project
mr_manurung
Online Now Online Now
Send Email Send Email
 
It depends on what kind of yahoo email you have. Let's say you have a local yahoo email, such as: yahoo.co.id, yahoo.co.uk, and so on... you can access it easily using any available SMPT or POP3 library for c++. But if your id is yahoo.com, you can not acces it using SMTP or POP3 protocol. You need to refer to fetchyahoo or ypop project for this.

If you want to know seriously, first, read RFC about how POP3 ans SMTP protocol works. Also equip yourself with network programming such as how to hande socket.

Here some good references:
http://www.codeproject.com/KB/IP/CSmtp.aspx
http://www.codeproject.com/KB/IP/cpop3conn.aspx
http://www.codeproject.com/KB/IP/win32_pop3.aspx

Good luck!

Auralius



--- Pada Jum, 30/10/09, Reid Thompson <jreidthompson@...> menulis:

Dari: Reid Thompson <jreidthompson@...>
Judul: Re: [C Programming] project
Kepada: cprogramming2@yahoogroups.com
Tanggal: Jumat, 30 Oktober, 2009, 5:52 AM

 

alaaziz64 wrote:
>
>
> hi all
> i work on project
> one part is to write a c program that read my yahoo email
> can any 1 help me in this
>

google for pop3 email C/C++ libraries and how to use them
if you can access your yahoo email via imap, you can also google for imap C/C++ libraries and how to use them



Yahoo! sekarang memiliki alamat Email baru
Dapatkan nama yang selalu Anda inginkan di domain baru @ymail dan @rocketmail. br> Cepat sebelum diambil orang lain!

#8802 From: isha khan <ishakhan2005@...>
Date: Sat Oct 31, 2009 4:40 am
Subject: Project
ishakhan2005
Offline Offline
Send Email Send Email
 
can any body send me a 'C' coding of BEST FIRST SEARCH ALGORITHM of artificial intelligence.plzzz help me

#8803 From: Kannibala M K <mkkannibala@...>
Date: Sat Oct 31, 2009 1:35 pm
Subject: Re: [C Programming] Write a program in c++
mkkannibala
Offline Offline
Send Email Send Email
 
Please refer the book, ANSCI C by Balagurusamy. This program is in last page..



From: basharatazad a <basharatazad@...>
Subject: [C Programming] Write a program in c++
To: cprogramming2@yahoogroups.com
Date: Wednesday, 21 October, 2009, 1:18 PM

 
Write a C++ program to implement employee directory, which will let the organization to perform the following functions:

1) Insert the record of new employee
2) Delete the record of an existing employee
3) Find the record of an existing employee
4) Display Report

Following information of each employee will be stored

Employee ID: an integer value to store the unique id for each employee
Employee Name: the name of each employee.
Employee Address: Address of each employee
Employee Salary: a float value to store salary of each employee.



From cricket scores to your friends. Try the Yahoo! India Homepage!

#8804 From: "kumraki" <kumraki@...>
Date: Thu Nov 5, 2009 2:43 pm
Subject: how convert byte to bits using struct
kumraki
Offline Offline
Send Email Send Email
 
Hi Everyone,

I am trying to break down the byte into small pieces of bits. Here is what I
want to do. open for any suggestions.

typedef struct
{
   unsigned char a : 2;
   unsigned char b : 3;
   unsigned char c : 3;
} test_byte;

int main()
{
  unsigned char n1 = 8;
  test_byte tb1;

  tb1 = *(test_byte *)n1;

}
output:
tb1.a = bit0 bit1
tb1.b = bit2 bit3 bit4
tb1.c = bit5 bit6 bit7

this is what I am trying to do any suggestions please welcome.

Thanks....

#8805 From: Paul Herring <pauljherring@...>
Date: Thu Nov 5, 2009 2:54 pm
Subject: Re: [C Programming] how convert byte to bits using struct
Shabble
Offline Offline
Send Email Send Email
 
On Thu, Nov 5, 2009 at 2:43 PM, kumraki <kumraki@...> wrote:
>
> Hi Everyone,
>
> I am trying to break down the byte into small pieces of bits. Here is what I
want to do. open for any suggestions.

Don't use structs - it's overkill. And potentially relying on
behaviour that may not be portable.

> typedef struct
> {
>  unsigned char a : 2;
>  unsigned char b : 3;
>  unsigned char c : 3;
> } test_byte;


int bits01(unsigned char c){
    return (c & 0x03);
}

int bits234(unsigned char c){
    return (c >> 2) & 0x07;
}

int bits 567(unsigned char c){
    return (c >> 5) & 0x07;
}

I suggest you change the names of the functions to more accurately
represent what those bit groupings actually represent.

> int main()
> {
>  unsigned char n1 = 8;
>  test_byte tb1;
>
>  tb1 = *(test_byte *)n1;
>
> }
> output:
> tb1.a = bit0 bit1
> tb1.b = bit2 bit3 bit4
> tb1.c = bit5 bit6 bit7
>
> this is what I am trying to do any suggestions please welcome.
>
> Thanks....


--
PJH

http://shabbleland.myminicity.com/
http://www.chavgangs.com/register.php?referer=9375
http://www.kongregate.com/?referrer=Shabble

#8806 From: "snowflakecardigan" <snowflakecardigan@...>
Date: Sun Nov 8, 2009 12:53 am
Subject: Mixed Mode C with assembly language
snowflakecar...
Offline Offline
Send Email Send Email
 
I know this code has more to do with assembly than C but that's why
I am having trouble understanding it.  I am not sure why the code
pushes SI twice and why push DI when it's not used. I need to know how does C
function know how to return the average so that assembly can retrieve it.

I think i need to fully understand this before i work on a program of my own
with mixed mode.


/* An example to illustrate  C function  -> assembly -> a C function.
      This program calls the assembly language procedure in file MARKS_A.ASM.
      The program outputs min,  max, and rounded average of two marks. */

  #include <stdio.h>
  int main(void)
  {      int mark1,mark2, min, max, av;
 	 int find_avg(int, int);
        	 extern  void stats(int, int, int*, int*, int*);
        	 scanf("%d%d",&mark1,&mark2);
        	 stats(mark1,mark2, &min, &max, &av);
	 printf("Min = %d, Max = %d, Av = %d\n", min, max, av);
        	 return 0;   }


   /*********************************************************
      * Returns the rounded average required by the assembly
     * procedure STATS in file MARKS_A.ASM.*/

	 int find_avg(int total, int number)     {
        	 return((int)((double)total/number + 0.5)); }


;---------------------------------------------------------­
; Assembly program example to show call to a C function.
; This procedure receives a marks array and class size
; and returns minimum, maximum, and rounded average marks.
;---------------------------------------------------------­
   .MODEL SMALL
  EXTRN _find_avg:PROC
  .CODE
   PUBLIC _stats
   _stats PROC
          	 push  BP
          	 mov  BP,SP
           	 push  SI
           	 push  DI


         	 mov   AX,[BP+4]            ; AX := mark1
         	 mov   DX,[BP+6]           ; DX := mark2
	         cmp   AX,DX 	 ; put min into AX and max into DX
               	 jl      next
               	 xchg   AX,DX
    next:
:         mov  SI,AX          	 ; SI gets sum
	         add  SI,DX

         	 mov   BX,[BP+8]   	 ; return minimum
          	 mov   [BX],AX
           	 mov   BX,[BP+10]   	 ; return maximum
          	 mov   [BX],DX

		 ; now call find_avg C function to compute average

                 mov    AX,2 		 ;push number of marks
                 push   AX
	         push   SI 		 ;push sum of marks
          	 call   _find_avg    	 ; returns average in AX
           	 add   SP,4         	 ; clear stack
          	 mov   BX,[BP+12]  		 ; return average
          	 mov   [BX],AX
           	 pop   DI
          	 pop   SI
           	 pop   BP
          	 ret 	  	 ; NOTE calling program clears stack
_stats       ENDP
	 END

#8807 From: video_ranger
Date: Sun Nov 8, 2009 8:16 pm
Subject: Re: Mixed Mode C with assembly language
video_ranger
Offline Offline
 
Saving and restoring BP,SI,DI is probably a formality included whether they
happen to be used or not (at least by the author of this program). Those are the
only registers required to be preserved.

The second push for SI that appears in:

push  AX
push  SI 	 ;push sum of marks
call  _find_avg  ; returns average in AX
add   SP,4        ; clear stack

is only to set up the two parameters (total,number) in that order on the stack
for the _find_avg subroutine. SI is the total.



--- In cprogramming2@yahoogroups.com, "snowflakecardigan"
<snowflakecardigan@...> wrote:
>
> I know this code has more to do with assembly than C but that's why
> I am having trouble understanding it.  I am not sure why the code
> pushes SI twice and why push DI when it's not used. I need to know how does C
function know how to return the average so that assembly can retrieve it.
>
> I think i need to fully understand this before i work on a program of my own
with mixed mode.
>
>
> /* An example to illustrate  C function  -> assembly -> a C function.
>      This program calls the assembly language procedure in file MARKS_A.ASM.
>      The program outputs min,  max, and rounded average of two marks. */
>
>  #include <stdio.h>
>  int main(void)
>  {      int mark1,mark2, min, max, av;
>   int find_avg(int, int);
>          extern  void stats(int, int, int*, int*, int*);
>          scanf("%d%d",&mark1,&mark2);
>          stats(mark1,mark2, &min, &max, &av);
>  printf("Min = %d, Max = %d, Av = %d\n", min, max, av);
>          return 0;   }
>
>
>   /*********************************************************
>      * Returns the rounded average required by the assembly
>     * procedure STATS in file MARKS_A.ASM.*/
>
>  int find_avg(int total, int number)     {
>          return((int)((double)total/number + 0.5)); }
>
>
> ;---------------------------------------------------------­
> ; Assembly program example to show call to a C function.
> ; This procedure receives a marks array and class size
> ; and returns minimum, maximum, and rounded average marks.
> ;---------------------------------------------------------­
>   .MODEL SMALL
>  EXTRN _find_avg:PROC
>  .CODE
>   PUBLIC _stats
>   _stats PROC
>            push  BP
>            mov  BP,SP
>             push  SI
>             push  DI
>
>
>           mov   AX,[BP+4]            ; AX := mark1
>           mov   DX,[BP+6]           ; DX := mark2
> 	        cmp   AX,DX 	 ; put min into AX and max into DX
>                 jl      next
>                 xchg   AX,DX
>    next:
> :         mov  SI,AX          	 ; SI gets sum
> 	        add  SI,DX
>
>           mov   BX,[BP+8]   	 ; return minimum
>            mov   [BX],AX
>             mov   BX,[BP+10]   	 ; return maximum
>            mov   [BX],DX
>
> 	 ; now call find_avg C function to compute average
>
>                 mov    AX,2 		 ;push number of marks
>                 push   AX
> 	        push   SI 		 ;push sum of marks
>            call   _find_avg    	 ; returns average in AX
>             add   SP,4         	 ; clear stack
>            mov   BX,[BP+12]  		 ; return average
>            mov   [BX],AX
>             pop   DI
>            pop   SI
>             pop   BP
>            ret 	  	 ; NOTE calling program clears stack
> _stats       ENDP
>  END
>

#8808 From: "kumraki" <kumraki@...>
Date: Tue Nov 10, 2009 1:01 pm
Subject: XOR the bits in a word
kumraki
Offline Offline
Send Email Send Email
 
Hi Folks,

I need some help in XOR the bits in a byte 8 bits.

flag bit = b1 xor b2 xor b3 xor b4 xor b5 xor b6 xor b7 xor b8

I want to do this with minimal operations in C.

thanks.

#8809 From: Paul Herring <pauljherring@...>
Date: Tue Nov 10, 2009 1:24 pm
Subject: Re: [C Programming] XOR the bits in a word
Shabble
Offline Offline
Send Email Send Email
 
On Tue, Nov 10, 2009 at 1:01 PM, kumraki <kumraki@...> wrote:
> Hi Folks,
>
> I need some help in XOR the bits in a byte 8 bits.
>
> flag bit = b1 xor b2 xor b3 xor b4 xor b5 xor b6 xor b7 xor b8
>
> I want to do this with minimal operations in C.

What you're after appears to be functionally equivalent to working out
the parity of a byte:

http://graphics.stanford.edu/~seander/bithacks.html#ParityWith64Bits


--
PJH

http://shabbleland.myminicity.com/
http://www.chavgangs.com/register.php?referer=9375
http://www.kongregate.com/?referrer=Shabble

#8810 From: "rskeister" <rkeister@...>
Date: Sun Nov 8, 2009 8:04 pm
Subject: question from a newbie
rskeister
Offline Offline
Send Email Send Email
 
Hello Group!

I was wondering what the breakdown of the group members is regarding using c
versus c++?
Just a ballpark figure.   c/c++.     50/50?      90/10?     10/90?    1/99?  
99/1?

I am learning c++.  strictly recreational.  I am most familiar with BASIC, but
figured it's time to  learn something used in this century.  I am using "C++
Primer Plus" (Stephen Prata) as a text.

I also am a devoted Mac person, but am starting to think that c++ is not a good
choice for the Mac.

Rob Keister
____________________________________
Can vegetarians eat animal crackers?

#8811 From: Paul Herring <pauljherring@...>
Date: Wed Nov 11, 2009 8:57 pm
Subject: Re: [C Programming] question from a newbie
Shabble
Offline Offline
Send Email Send Email
 
On Sun, Nov 8, 2009 at 8:04 PM, rskeister <rkeister@...> wrote:
> Hello Group!
>
> I was wondering what the breakdown of the group members is regarding using c
versus c++?
> Just a ballpark figure.   c/c++.     50/50?      90/10?     10/90?    1/99?  
99/1?

You appear to be missing the group that uses both.

> I also am a devoted Mac person, but am starting to think that c++ is not a
good choice for the Mac.

I'm sure modern versions of FruitOS come with gcc.

--
PJH

http://shabbleland.myminicity.com/
http://www.chavgangs.com/register.php?referer=9375
http://www.kongregate.com/?referrer=Shabble

#8812 From: Reid Thompson <jreidthompson@...>
Date: Wed Nov 11, 2009 9:32 pm
Subject: Re: [C Programming] question from a newbie
jreidthompson
Online Now Online Now
Send Email Send Email
 
On Sun, 2009-11-08 at 20:04 +0000, rskeister wrote:
>
> Hello Group!
>
> I was wondering what the breakdown of the group members is regarding
> using c versus c++?
> Just a ballpark figure. c/c++. 50/50? 90/10? 10/90? 1/99? 99/1?
>
> I am learning c++. strictly recreational. I am most familiar with
> BASIC, but figured it's time to learn something used in this century.
> I am using "C++ Primer Plus" (Stephen Prata) as a text.
>
> I also am a devoted Mac person, but am starting to think that c++ is
> not a good choice for the Mac.
>

I do a lot of C, I do no C++.

Mac -> native is mostly Objective-C I think.
I imagine that if Apple's compiler doesn't handle C, that gcc would be
available for OSX.

http://developer.apple.com/mac/library/documentation/cocoa/Conceptual/ObjectiveC\
/Introduction/introObjectiveC.html
The Objective-C language is a simple computer language designed to
enable sophisticated object-oriented programming. Objective-C is defined
as a small but powerful set of extensions to the standard ANSI C
language. Its additions to C are mostly based on Smalltalk, one of the
first object-oriented programming languages. Objective-C is designed to
give C full object-oriented programming capabilities, and to do so in a
simple and straightforward way.

#8813 From: Kannibala M K <mkkannibala@...>
Date: Fri Nov 13, 2009 10:42 am
Subject: Re: [C Programming] XOR the bits in a word
mkkannibala
Offline Offline
Send Email Send Email
 
Refer Ashok N.Kamthane book.....

--- On Tue, 10/11/09, kumraki <kumraki@...> wrote:

From: kumraki <kumraki@...>
Subject: [C Programming] XOR the bits in a word
To: cprogramming2@yahoogroups.com
Date: Tuesday, 10 November, 2009, 1:01 PM

 
Hi Folks,

I need some help in XOR the bits in a byte 8 bits.

flag bit = b1 xor b2 xor b3 xor b4 xor b5 xor b6 xor b7 xor b8

I want to do this with minimal operations in C.

thanks.



Add whatever you love to the Yahoo! India homepage. Try now!

#8814 From: "Rushawn" <rosobady@...>
Date: Sun Nov 15, 2009 4:49 pm
Subject: Assistant ergently needed
rosobady
Offline Offline
Send Email Send Email
 
I have a programming project that i need help with. I have to do the C  program
then dram the flowchart. I have already done the program but i have problem
doing the flowchart can someone help me

#8815 From: "basicpoke" <basicpoke@...>
Date: Sun Nov 15, 2009 9:49 pm
Subject: Re: question from a newbie
basicpoke
Offline Offline
Send Email Send Email
 
On some groups you can create a poll but I don't see how to do it here.  Right
now I use C for embedded and C++ and C# (these 2 for consumer apps) and VB for
my own utilities.
BasicPoke


--- In cprogramming2@yahoogroups.com, "rskeister" <rkeister@...> wrote:
>
> Hello Group!
>
> I was wondering what the breakdown of the group members is regarding using c
versus c++?
> Just a ballpark figure.   c/c++.     50/50?      90/10?     10/90?    1/99?  
99/1?
>
> I am learning c++.  strictly recreational.  I am most familiar with BASIC, but
figured it's time to  learn something used in this century.  I am using "C++
Primer Plus" (Stephen Prata) as a text.
>
> I also am a devoted Mac person, but am starting to think that c++ is not a
good choice for the Mac.
>
> Rob Keister
> ____________________________________
> Can vegetarians eat animal crackers?
>

#8816 From: Rob Keister <rkeister@...>
Date: Mon Nov 16, 2009 12:38 am
Subject: Re: [C Programming] Digest Number 1762
rskeister
Offline Offline
Send Email Send Email
 
Well there you go.  As a newbie it didn't occur to me that of course there would multi-lingual programmers.

Rob

______________________________
The secret of life is honesty and fair-dealing. 
If you can fake that you've got it made. - Groucho Marx


On Nov 12, 2009, at 6:18 AM, cprogramming2@yahoogroups.com wrote:

On Sun, Nov 8, 2009 at 8:04 PM, rskeister <rkeister@zippnet.net> wrote:
> Hello Group!
>
> I was wondering what the breakdown of the group members is regarding using c versus c++?
> Just a ballpark figure.   c/c++.     50/50?      90/10?     10/90?    1/99?   99/1?

You appear to be missing the group that uses both.

> I also am a devoted Mac person, but am starting to think that c++ is not a good choice for the Mac.

I'm sure modern versions of FruitOS come with gcc.


#8817 From: Reid Thompson <jreidthompson@...>
Date: Mon Nov 16, 2009 1:41 pm
Subject: Re: [C Programming] Digest Number 1762
jreidthompson
Online Now Online Now
Send Email Send Email
 
On Sun, 2009-11-15 at 16:38 -0800, Rob Keister wrote:
>
> Well there you go.  As a newbie it didn't occur to me that of course
> there would multi-lingual programmers.


> On Nov 12, 2009, at 6:18 AM, cprogramming2@yahoogroups.com wrote:
>
> > On Sun, Nov 8, 2009 at 8:04 PM, rskeister <rkeister@...>
> > wrote:
> > > Hello Group!
> > >
> > > I was wondering what the breakdown of the group members is
> > regarding using c versus c++?
> > > Just a ballpark figure.   c/c++.     50/50?      90/10?
> > 10/90?    1/99?   99/1?
> >
> > You appear to be missing the group that uses both.
> >
> > > I also am a devoted Mac person, but am starting to think that c++
> > is not a good choice for the Mac.
> >
> > I'm sure modern versions of FruitOS come with gcc.
>
>

Actually, the example you provided does show both.
c/c++ -> 50/50 -> uses c 50% of the time and c++ 50% of the time
c/c++ -> 90/10 ->        90%                     10%
c/c++ -> 10/90 ->        10%                     90%


reid

#8818 From: Manish Chawda <manishpchawda@...>
Date: Wed Nov 18, 2009 6:57 am
Subject: c++ Code Issue
manishpchawda
Offline Offline
Send Email Send Email
 
Hi,

Following code in C++ is giving error: I have replaced arrays with pointers and its not working: Pls. help

#include<iostream>
using namespace std;

class publisher
{

protected:
    char *title;

public:
    void getdata()
    {
        cout << "Enter the title: ";
        cin >> title;
    }

    void printdata()
    {
        cout << "The title is: " << title << endl;
    }
       

};

class sales
{

protected:
    float *no_of_three_months_sales[3];

public:
    void getdata()
    {
        cout << "Enter the sales of three months: ";
        for(int i=0; i < 3; i++)
            cin >> no_of_three_months_sales[i];
    }

    void printdata()
    {
        for(int i=0; i < 3; i++)
            cout << "The sales for " << i + 1 << "month is " << no_of_three_months_sales[i] << endl;
    }

};


class book:public publisher, sales
{
    float price;
    int pages;

public:
    void getdata()
    {
        publisher::getdata();
        cout << "Enter the price of book: ";
        cin  >> price;
        cout << "Enter the no. of pages: ";
        cin >> pages;   
        sales::getdata();
    }

    void printdata()
    {
        publisher::printdata();
        cout << "The price of the book is: " << price << endl;
        cout << "The no. of pages is: " << pages << endl;
        sales::printdata();
    }
};


class tape:public publisher, sales
{
    float time;
    float price;

public:
    void getdata()
    {
        publisher::getdata();
        cout << "Enter the playing time: ";
        cin  >> time;
        cout << "Enter the price of the tape: ";
        cin >> price;   
        sales::getdata();
    }

    void printdata()
    {
        publisher::printdata();
        cout << "The playing is: " << time << endl;
        cout << "The price of the tape is: " << price << endl;
        sales::printdata();
    }

};


int main()
{
    book b;
    tape t;
    b.getdata();
    t.getdata();
    b.printdata();
    t.printdata();   

    return 0;
}




The INTERNET now has a personality. YOURS! See your Yahoo! Homepage.

#8820 From: "manishpchawda" <manishpchawda@...>
Date: Wed Nov 18, 2009 6:34 am
Subject: c code
manishpchawda
Offline Offline
Send Email Send Email
 
Hi,

I am not able to understand the output of the following:

unsigned char x;
x = 300;
printf("%d",x);

int x,y;
x = 5;
y = 10;
printf("%d\t%d\t%d\t%d\t",x++,y++,++x,++y);

#8821 From: Manish Chawda <manishpchawda@...>
Date: Wed Nov 18, 2009 6:55 am
Subject: C++ & C code issues
manishpchawda
Offline Offline
Send Email Send Email
 
Hi,

I am not able to understand the output of following C program :

unsigned char x;
x = 300;
printf("%d",x);

int x,y;
x = 5;
y = 10;
printf("%d\t%d\t%d\t%d\t",x++,y++,++x,++y);

Following is the C++ Program giving error:

#include<iostream>
using namespace std;

class furniture
{
protected:
    char *color;
    int width, height;
};

class shelf:public furniture
{
    int no_of_shelves;
public:
    shelf(char *c, int w, int h, int s)
    {
        color = c;
        width = w;
        height = h;
        no_of_shelves = s;       
    }

    void print()
    {
        cout << "Colour is: " << color << endl;
        cout << "Width is: " << width << endl;
        cout << "Heigth is: " << height << endl;
        cout << "No of Shelves is: " << no_of_shelves << endl;
    }   

};

int main()
{
   char *col;
    int width, height, no_of_shelf;
    cout << "Enter the colour of Shelf: ";
    cin >> col;
    cout << "Enter the width of shelf: ";
    cin >> width;
    cout << "Enter the heigth of shelf: ";
    cin >> height;
    cout << "Enter the number of shelf: ";
    cin >> no_of_shelf;

    cout << endl;

    shelf s(col, width, height, no_of_shelf);
    s.print();

    return 0;
}







The INTERNET now has a personality. YOURS! See your Yahoo! Homepage.

#8822 From: Paul Herring <pauljherring@...>
Date: Thu Nov 19, 2009 8:35 pm
Subject: Re: [C Programming] c code
Shabble
Offline Offline
Send Email Send Email
 
On Wed, Nov 18, 2009 at 6:34 AM, manishpchawda
<manishpchawda@...> wrote:
> Hi,
>
> I am not able to understand the output of the following:

Understandable, since what you're doing isn't defined, and you
shouldn't do it in C or C++.

> unsigned char x;
> x = 300;
> printf("%d",x);
>
> int x,y;
> x = 5;
> y = 10;
> printf("%d\t%d\t%d\t%d\t",x++,y++,++x,++y);

http://c-faq.com/expr/evalorder2.html

You're basically modifying both x and y twice between sequence points,
which doesn't have any 'defined' behaviour.

--
PJH

http://shabbleland.myminicity.com/
http://www.chavgangs.com/register.php?referer=9375
http://www.kongregate.com/?referrer=Shabble

#8824 From: "the_black_angel13" <the_black_angel13@...>
Date: Sun Nov 22, 2009 10:44 pm
Subject: Re: Work from Home opportunity
the_black_an...
Online Now Online Now
Send Email Send Email
 
Is there any proof this is real? I'm a student and would be great but I've never
actually seen a work at home program thats real.
--- In cprogramming2@yahoogroups.com, anil_jupiter <no_reply@...> wrote:
>
> Work from Home opportunity...........Only for serious people .....
>
> Ideal for Homemakers, students or people with spare time in day .....
>
> Please complete this form
>
>
http://spreadsheets.google.com/viewform?formkey=dE5ET3l5eW5rS3RsQUdNUzF1ZGVST1E6\
MA
>

#8825 From: Paul Herring <pauljherring@...>
Date: Mon Nov 23, 2009 12:02 am
Subject: Re: [C Programming] Re: Work from Home opportunity
Shabble
Offline Offline
Send Email Send Email
 
On Sun, Nov 22, 2009 at 10:44 PM, the_black_angel13
<the_black_angel13@...> wrote:
>
> Is there any proof this is real? I'm a student and would be great but I've
never actually seen a work at home program thats real.

It's spam. Just ignore it.

--
PJH

http://shabbleland.myminicity.com/
http://www.chavgangs.com/register.php?referer=9375
http://www.kongregate.com/?referrer=Shabble

#8826 From: James Takac <p3nn@...>
Date: Mon Nov 23, 2009 2:38 am
Subject: Re: [C Programming] Re: Work from Home opportunity
penndragonwau
Online Now Online Now
Send Email Send Email
 
Sad to say these are generally just spams. I tend to be wary of any who ignore
the lists topics lie that. You're more likely to end up with even more spam
by replying to it and prob more virii sent your way. You'll note there's no
mention of the company looking to hire. That's so you can't check up on it

James

On Monday 23 November 2009 08:44:34 the_black_angel13 wrote:
> Is there any proof this is real? I'm a student and would be great but I've
> never actually seen a work at home program thats real.
>
> --- In cprogramming2@yahoogroups.com, anil_jupiter <no_reply@...> wrote:
> > Work from Home opportunity...........Only for serious people .....
> >
> > Ideal for Homemakers, students or people with spare time in day .....
> >
> > Please complete this form
> >
> > http://spreadsheets.google.com/viewform?formkey=dE5ET3l5eW5rS3RsQUdNUzF1Z
> >GVST1E6MA

#8827 From: "nico_heinze" <grollnar@...>
Date: Thu Nov 26, 2009 9:43 pm
Subject: Re: spam
nico_heinze
Offline Offline
Send Email Send Email
 
Sorry that I haven't seen this stupid spam message early enough.
I have removed this person from the forum and will continue to do so in the
future.

These spam posts are the reason why I've set every new member of this board to
Moderated status. Sad to see that sometimes I miss one or the other. Sorry for
that.

Regards,
Nico

#8828 From: Kiandra Plummer <kpsourcerqueen@...>
Date: Mon Nov 23, 2009 12:22 am
Subject: Re: [C Programming] Re: Work from Home opportunity
kpsourcerqueen
Online Now Online Now
Send Email Send Email
 
For legitimate work at home jobs, try

http://www.tjobs.com
http://www.virtualvocations.com
http://www.flexjobs.com

They usually have categories specifically for positions specifically in the computer field

Good Luck!
  Kiandra
 
Kiandra Plummer
Internet Research & Marketing Professional
Email: kpsourcerqueen@...
Let's Stay Connected
http://www.linkedin.com/in/kiandra


From: Paul Herring <pauljherring@...>
To: cprogramming2@yahoogroups.com
Sent: Sun, November 22, 2009 7:02:42 PM
Subject: Re: [C Programming] Re: Work from Home opportunity

 

On Sun, Nov 22, 2009 at 10:44 PM, the_black_angel13
<the_black_angel13@ yahoo.com> wrote:
>
> Is there any proof this is real? I'm a student and would be great but I've never actually seen a work at home program thats real.

It's spam. Just ignore it.

--
PJH

http://shabbleland. myminicity. com/
http://www.chavgang s.com/register. php?referer= 9375
http://www.kongregate.com/?referrer=Shabble



#8829 From: "James" <james1232@...>
Date: Wed Nov 25, 2009 10:02 pm
Subject: Can someone Please Help a programming student out?
james_gauntner
Offline Offline
Send Email Send Email
 
I have the following assignment in my one class for the week and a major part of
my grade for the term.  I have to interview someone that works within the
Programming field.  I was wondering if I could interview a professional
programmer from within this group. I will except interviews with several people
and choose the best one.

The project is due next Tuesday.  Any assistance will be highly appreciated.

Thank You

James A Gauntner


Interview questions:

1.  What is your title?



2.  What are your responsibilities?



3.  What kinds of skills do you need to perform your job?



4.  Describe what you do during a typical day.



5.  What other jobs have you held that might have helped prepare you for this
position?



6.  Do you have people who work for you, and what do they do?



7.  What is one of the most challenging things about the work you do?



8.  What time management tips could you suggest?



9.  How do you balance your family, job, work, and leisure time?



10. What advice would you give to someone interested in this career?




Additional information shared, or other interviewer notes (not required):

Messages 8798 - 8829 of 8829   Oldest  |  < Older  |  Newer >  |  Newest
Advanced
Add to My Yahoo!      XML What's This?

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help