Search:

Type: Posts; User: _arjun

Page 1 of 2 1 2

Search: Search took 0.00 seconds.

  1. Thread: Scope of macros

    by _arjun
    Replies
    2
    Views
    1,171

    Scope of macros

    While this is written in K & R "The scope of a name defined with #define is from its point of definition to the end of the source file being compiled."

    Why this piece of code is working fine ?

    ...
  2. Thread: C statement

    by _arjun
    Replies
    5
    Views
    1,026

    Thanks for replying, Can you tell me an...

    Thanks for replying,

    Can you tell me an example where a line is ended by ";" and that line is not called as statement ?
  3. Thread: -pedantic

    by _arjun
    Replies
    1
    Views
    1,034

    -pedantic

    I have written this code



    #include <stdio.h>

    int main() {
    unsigned char c;
  4. Thread: C statement

    by _arjun
    Replies
    5
    Views
    1,026

    C statement

    Is every line terminated by ";" is a statement in C ?
    Which type of statement is "int i;" ?
    Is #include <stdio.h> is also a statement?
  5. Replies
    2
    Views
    842

    resize funtion complexity

    If my string s size is n and I do something like

    s.resize(c); // c < n

    will it take constant time or linear?

    What will it be in case of c > n.
  6. Thread: Strlen

    by _arjun
    Replies
    9
    Views
    2,100

    Thank you all guys :)

    Thank you all guys :)
  7. Thread: Strlen

    by _arjun
    Replies
    9
    Views
    2,100

    Thanks

    Thanks
  8. Thread: Strlen

    by _arjun
    Replies
    9
    Views
    2,100

    Strlen

    If I write some thing like this

    for(int i = 0 ; i < strlen(s) ; i++)

    will it be O(n^2) ?

    Also please tell me where can I see codes of standard library of C (GCC) in Ubuntu.
  9. Replies
    2
    Views
    1,227

    Modulous operator

    Is it true that is c99, a%b is calulated as sign(a) * (abs(a) % abs(b)) ?

    where,
    sign(a) = 1 if a is +ve
    sign(a) = -1 if a is -ve.
  10. Replies
    2
    Views
    820

    Function in other file

    I have written a code in a file 4.c



    #incldue<stdio.h>

    int main() {
    printf("%d",fun(22));
    return 0;
    }
  11. Replies
    2
    Views
    1,190

    Errors and warnings

    Hi,

    Can anybody tell me whether compilation error given by a compiler are specific to it or Standard say something like "This behavior is an Error and it should be reported as Error on all...
  12. Replies
    8
    Views
    2,648

    Just confirming is expression i = i = 1; ...

    Just confirming

    is expression

    i = i = 1;

    also undefined because it also modifies the object more than once between sequence point
  13. Replies
    3
    Views
    1,282

    Machine dependent and implementation defined

    Is there any difference between these two terms.
  14. Thread: size of char

    by _arjun
    Replies
    6
    Views
    3,489

    Thanks

    Thanks
  15. Thread: size of char

    by _arjun
    Replies
    6
    Views
    3,489

    but can be larger than 8 bits(in both c89 and...

    but can be larger than 8 bits(in both c89 and c99), right ?
  16. Thread: size of char

    by _arjun
    Replies
    6
    Views
    3,489

    size of char

    What are limitations on size of char, are there any differences in c89 and c99 on size of char
  17. Replies
    3
    Views
    764

    Structure alligment

    I can understand that the size of



    struct {
    char c;
    int x;
    }
  18. Replies
    7
    Views
    5,798

    Thank you so much for clarifying my doubt:)

    Thank you so much for clarifying my doubt:)
  19. Replies
    7
    Views
    5,798

    Actually K&R says that float has...

    Actually K&R says that float has single-precision, what I want to know is that whether single-precision is attached with IEEE or not, AFAIK single precision term always comes with IEEE.

    Please...
  20. Replies
    7
    Views
    5,798

    Float and double size

    I was reading K&R, in section 2.2 they mentioned that

    float is single precision floating point, and
    double is double precision floating point

    When I checked wiki, it says that "IEEE...
  21. Replies
    8
    Views
    2,648

    Thanks got it :)

    Thanks got it :)
  22. Replies
    8
    Views
    2,648

    Thanks you very much for such a clear answer :)....

    Thanks you very much for such a clear answer :).

    Regarding second question I think it should be well defined, because I have read this at many places that "++i" will "first increment the value of...
  23. Replies
    8
    Views
    2,648

    post and pre increment operator

    I was learning sequence point and I get really confused by example given in wikipedia that "i=i++" is undefined,

    Can anybody explain me why it is so ? I can understand that "a[i] = i++" is...
  24. Thread: '\?'

    by _arjun
    Replies
    0
    Views
    743

    '\?'

    Why C provides this '\?', when we can use plain '?' or "?" ?
  25. Thread: strcmp

    by _arjun
    Replies
    5
    Views
    2,796

    Thanks :)

    Thanks :)
Results 1 to 25 of 28
Page 1 of 2 1 2