Search:

Type: Posts; User: pshirishreddy

Page 1 of 2 1 2

Search: Search took 0.00 seconds.

  1. Replies
    8
    Views
    1,610

    can array be assigned a pointer ?

    main(){
    CountingSort c ;
    int inputArray[10] = {23,12,45,46,25,12,32,43,32,29};
    int* outputA;
    c.setInputArray(inputArray);
    inputArray = c.sort();

    /*...
  2. Replies
    2
    Views
    1,314

    thanks bithub

    thanks bithub
  3. Replies
    2
    Views
    1,314

    Basic doubt

    hello shouldn't the code below return 11 for "hello there", it returns me the size of the first word i.e 5 for hello



    #include<iostream>
    #include <string>
    using namespace std;

    int main(){...
  4. Replies
    3
    Views
    1,170

    char buf[BUFSIZE]; int bufp=0; //next free...

    char buf[BUFSIZE];
    int bufp=0; //next free position in buf

    int getch(void){
    return((bufp>0) ? buf[--bufp]:getchar());
    }

    void ungetch(int c){
    if(bufp >=BUFSIZE)
    printf("too manu");
  5. Replies
    3
    Views
    1,170

    I don't get the difference :(

    Aren't both of the below posted codes analogous


    int getword(char *word, int len){
    int cnt = 0,c;

    for(cnt = 0; (c=getchar())!= ' ' && c!='\n' && cnt<len; cnt++)
    *word++=c;...
  6. Replies
    5
    Views
    1,173

    bleh!

    bleh!
  7. Replies
    5
    Views
    1,938

    thank you...

    thank you...
  8. Replies
    5
    Views
    1,938

    i have analyzed the cases with ...

    i have analyzed the cases with


    printf("%d\t%d\t%d\n",p->len++,p->len++,p->len++);


    the out put i get is
    2 1 0

    and even with
  9. Replies
    5
    Views
    1,938

    Strange behaviour of printf

    Hello every one I dont understand why my output is different
    here is my code


    #include <stdio.h>
    #include <stdlib.h>

    struct {
    int len ; //cannot initialize to a value directly
    char...
  10. Replies
    11
    Views
    8,876

    thank you..

    thank you..
  11. Replies
    11
    Views
    8,876

    thanks tabstop, where can i get the list of...

    thanks tabstop, where can i get the list of switches for the corresponding libraries ?
  12. Replies
    11
    Views
    8,876

    So, are there switches for every library like the...

    So, are there switches for every library like the math library ?
  13. Replies
    11
    Views
    8,876

    Any idea on why the linking doesn't happen,...

    Any idea on why the linking doesn't happen, though it solves the problem i am a little confused on why it doesnt compile the normal way. I never used the -lm switch before what does the switch do, i...
  14. Replies
    11
    Views
    8,876

    Even after i correct the function name i end up...

    Even after i correct the function name i end up with errors like undefined reference to
    /tmp/ccfw9Xlk.o: In function `num_zeroes':
    fctr.c:(.text+0x33): undefined reference to `pow'...
  15. Replies
    11
    Views
    8,876

    Undefined reference error

    hello,

    I get the follow error when i compile the code


    fctr.c: In function ‘main’:
    fctr.c:17: warning: format ‘%ld’ expects type ‘long int’, but argument 2 has type ‘int’
    /tmp/ccfw9Xlk.o:...
  16. Thanks MK27

    Thanks MK27
  17. getchar won't take any input after scanf

    hello,

    Its a come back for me to this forum after a long time,
    I have got this weird problem that getchar wont function after two successive scanf's

    #include <stdio.h>
    main(){
    int a;...
  18. Replies
    15
    Views
    11,312

    NUCLEON that was very handy thanks a lot..

    NUCLEON
    that was very handy thanks a lot..
  19. Replies
    15
    Views
    11,312

    i would be implementing CRC then.. :D

    i would be implementing CRC then..
    :D
  20. Replies
    15
    Views
    11,312

    okie then will try out some thing from it.. ...

    okie then will try out some thing from it..
    thank you laser light
  21. Replies
    15
    Views
    11,312

    than could you suggest me any solution for the...

    than could you suggest me any solution for the same !!
  22. Replies
    15
    Views
    11,312

    #include main(){ char msg[32];...

    #include <stdio.h>

    main(){
    char msg[32];
    long int a;
    gets(msg);
    printf("&#37;s",msg);
    a=atoi(msg);
    printf("%d",a);
    }
  23. Replies
    15
    Views
    11,312

    yes it is indeed related to a checksum...

    yes it is indeed related to a checksum algorithm..
    that is not actually the point i am worried about
    its about the how to get binary values for a string
    to perform such an operation..
  24. Replies
    15
    Views
    11,312

    its like checking the data here is the simple...

    its like checking the data here is the simple example
    of xor of two int values


    int a=10; // 1010
    int b=5; // 0101
    c=a^b; // 1111 = 15;


    the same thing i have to do...
  25. Replies
    15
    Views
    11,312

    XOR for a string

    well my problem here was to check for some error by using the bitwise XOR (^) operator on two strings.
    so for doing that i need to convert the strings to binary values i used the below method but...
Results 1 to 25 of 30
Page 1 of 2 1 2