User Profile

Collapse

Profile Sidebar

Collapse
smartway
smartway
Last Activity: Nov 20 '07, 11:10 AM
Joined: Oct 5 '06
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • smartway
    replied to hi can any1 help me
    in C
    You can also try modifyimg the following linesin your code
    while(t != -999)
    {
    scanf("%d", &t);
    if(t != -999)
    {
    temp_readings[count]= t;
    count++;
    }

    as

    scanf("%d", &t);
    while(t != -999)
    {
    temp_readings[count]= t;
    count++;
    scanf("%d", &t);
    }
    See more | Go to post

    Leave a comment:


  • smartway
    replied to Any wrong with my for loop?
    in C
    In your program j is int that is nothing but the signed int and length funtion returns unsigned int. To avoid this warning you have to make both of same type.
    If you declare j as unsigned int then the warning will not come or you will have to do cast conversion of return type of length function.
    See more | Go to post

    Leave a comment:


  • smartway
    replied to Converting a text string to an array of numbers
    in C
    I think it will be better to use fscanf instead of scanf.
    See more | Go to post

    Leave a comment:


  • smartway
    replied to How to detect the white space?
    in C
    Use substr function for " " (space).
    See more | Go to post

    Leave a comment:


  • smartway
    replied to Stringbuf for concurrent writing And reading
    in C
    How did you define 'is'?
    See more | Go to post

    Leave a comment:


  • smartway
    replied to Help me in this "Switch Statement" Puzzle !
    in C
    switch case structure is replacemet for if-else if....-else structure

    try the following code
    switch (response)
    {
    case 'y':
    cout<< "Your request is being processed"<< endl;
    break;

    case 'n':
    cout<<" Thank you anyway for your consideration" << endl;
    break;

    case 'h':
    cout<<"Sorry, no help is currently...
    See more | Go to post

    Leave a comment:


  • You have been asked to use type long int to store the input number number read in…so you get a lot of digits.

    The input for your program is a number that should be declared as long int so that you can have long number containing more digits.

    The Logic I can explain you then you try to put it in program
    Use one more array of size 10 corresponding to digits 0 to 9 which stores the count of the corresponding digits..........
    See more | Go to post

    Leave a comment:


  • smartway
    replied to please help
    in C
    unless and untill you start something no one is going to help you. You try first and then ask if you have any queries.
    See more | Go to post

    Leave a comment:


  • smartway
    started a topic Exception Handling
    in C

    Exception Handling

    How can we do exception handling for declaring object of the class in C++?
    See more | Go to post

  • smartway
    replied to diff
    in C
    strcpy ends copying of data when it reaches NULL character (Say, '\0' or 0) and then copies NULL at the end of destination data. It is specifically used to copy strings (char[]).
    memcpy can be used to copy any type of data (void*). It terminates at the byte position specified by the third parameter.
    See more | Go to post

    Leave a comment:


  • smartway
    replied to pointers
    in C
    A dangling pointer is a pointer to storage that is no longer allocated.
    See more | Go to post

    Leave a comment:


  • smartway
    replied to need help on TREE
    in C
    Which tree you are using ?
    See more | Go to post

    Leave a comment:


  • smartway
    replied to can anyone tell me the code for this?
    in C
    it is working fine on my side can you please give the code
    See more | Go to post

    Leave a comment:


  • smartway
    replied to can anyone tell me the code for this?
    in C
    try the code given below and let me know the result
    for (i=1;i<=k;i++)
    {
    for (j=1;j<=m;j++)
    cout<<"*";
    cout<<endl;
    m+=2;
    }
    See more | Go to post

    Leave a comment:


  • smartway
    replied to pls...how this is working...
    in C
    hi
    #define q(k)main(){ return!puts(#k" \nPRABUq("#k")" );}

    q(#define q(k)main(){retu rn!puts(#k"\nq( "#k")");})

    the above code will be converted into following code after preprocessing
    here k = #define q(k)main(){retu rn!puts(#k"\nq( "#k")");}

    and we have defined q(k) in the first line

    just substitue k in the text following...
    See more | Go to post

    Leave a comment:


  • smartway
    replied to C++ code in c prog
    in C
    can you please explain this using example?
    See more | Go to post

    Leave a comment:


  • smartway
    started a topic C++ code in c prog
    in C

    C++ code in c prog

    Can we use c++ code in c prog or can we include .cpp in c prog. ? If yes ........ How can we do this?
    See more | Go to post

  • smartway
    replied to Structured Array
    in C
    you will have to use 2D array for test
    See more | Go to post

    Leave a comment:


  • smartway
    replied to c++n program
    in C
    Yes you are right....the file should already be created with 10 numbers in it
    no output will be shown on console but after running the code when you open myoutput.txt if you find the desired output then it means it is working fine.
    See more | Go to post

    Leave a comment:


  • smartway
    replied to c++n program
    in C
    Try this

    #include <string>
    #include <iostream>
    #include <fstream>
    using namespace std;
    int main()
    {
    int num;
    int positivecount, negativecount, sumneg, sumpos;

    ofstream outfile;
    ifstream infile;
    string filename;

    positivecount=0 ;
    negativecount=0 ;
    sumneg=0;
    sumpos=0;

    cout << "enter...
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...