Search:

Type: Posts; User: GokhanK

Page 1 of 5 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    1
    Views
    613

    inline keyword and function prototype

    Hello everybody,

    Years ago I opened the topic linked below about the same thing but at that time I had much less understanding of C and the answers seemed to me enough. Now I want to learn a...
  2. Replies
    14
    Views
    1,289

    I have understood what works in functions and...

    I have understood what works in functions and what not with more trial and error. For variable declaration, the first of below works with the aid of implicit int rule but the second is not converted...
  3. Replies
    14
    Views
    1,289

    To be honest I don't think I will use this. The...

    To be honest I don't think I will use this. The question is mostly because of curiosity and to be able to understand if I see them in an old code.
  4. Replies
    14
    Views
    1,289

    Thanks for the correction. But what if I don't...

    Thanks for the correction. But what if I don't declare them at all, does implicit int rule makes them int automatically?
  5. Replies
    14
    Views
    1,289

    Implicit int rule in Function Parameters

    Hello All,

    My question is about the old implicit int rule. I do not use that one and as far as I know it is encouraged not to use and it is obselete now. However I want to learn it just in case I...
  6. Replies
    7
    Views
    833

    Thanks for your correction, it seems I will need...

    Thanks for your correction, it seems I will need to spend some time with these to gain familiarisation and get used to write my code properly.
  7. Replies
    7
    Views
    833

    @jimblumberg and @laserlight Thanks a lot for...

    @jimblumberg and @laserlight

    Thanks a lot for your answers. They did not only clarify things for me but also gave me good keywords to search on Google more. My search took me to C99 draft...
  8. Replies
    7
    Views
    833

    I was thinking I was saying the same thing [I...

    I was thinking I was saying the same thing [I used the name 'a' instead of 'array' by mistake.] The first element of the array is array[0], the value of its address is the same as the adress of...
  9. Replies
    7
    Views
    833

    Array as an argument to a function

    Hello All,

    I have a question about function definitions and calls which accept arrays as their argument.

    As far as I see the types of formal parameters and arguments match. For example if I...
  10. Thanks for the replies, I had already added the...

    Thanks for the replies, I had already added the file to the project but I was assuming I also needed to adress it with including. When I deleted the include line it just saw the file and worked.
    ...
  11. Creating My First Project with Code::Blocks

    Hello everyone,

    I have learnt a bit C programming but used the language for the case specific small tasks and always implemented all the functions I needed to one file. This time I have decided to...
  12. Replies
    4
    Views
    1,043

    Thanks for the hint, one more dereference solves...

    Thanks for the hint, one more dereference solves the problem. I will think about the logic.


    #include <stdio.h>

    int main(void){
    int array[2][2];
    int (*ptr)[2];
    ptr=array;
    ...
  13. Replies
    4
    Views
    1,043

    My compiler doesn't give me an error and shows a...

    My compiler doesn't give me an error and shows a console window but the one below may compile well. However it still doesn't work.


    #include <stdio.h>

    int main(void){
    int array[2][2];
    ...
  14. Replies
    4
    Views
    1,043

    Pointer Arithmetics and Arrays

    I am trying to figure out how pointer arithmetics work on arrays. However I couldn't make an example work.

    Firstly I start with a one dimensional array and the example works;



    #include...
  15. Replies
    6
    Views
    1,060

    Thanks for your reply. I was about to ask if...

    Thanks for your reply. I was about to ask if example[2] is equivalent to &example[2][0] but you have answered before I even ask. I have learnt much from this forum. Thank you so much.
  16. Replies
    6
    Views
    1,060

    Great! I was looking for a way to test the type....

    Great! I was looking for a way to test the type. I use Code::Blocks with GCC GNU Compiler. I will search how can I open warnings.

    Thanks for your help.
  17. Replies
    6
    Views
    1,060

    I have understood much of this. Thanks for your...

    I have understood much of this. Thanks for your help. I will have some questions about the passing arrays as arguments to functions but before this I want to clarify something.



    Do you mean...
  18. Replies
    6
    Views
    1,060

    Clarification on Pointers and Arrays

    Hello Everyone,

    There is a lot confusion on internet and some books about the pointers and array names.

    I have seen some sources claiming array and &array are the same as array is the name of...
  19. Thanks for both noticing me. Actually I was...

    Thanks for both noticing me. Actually I was reading my old notes and I had taken note of this "size_t is defined in typdef library". However I reopened the book I was studying when I took these notes...
  20. Is it required to include typedef to use sizeof

    Hello everyone

    I wonder if it is required to write #include <typedef.h> at the begining of the code to use the sizeof operator according to the standard.

    The return type of the sizeof operator...
  21. Replies
    5
    Views
    511

    I have understood it now. I tried with another...

    I have understood it now. I tried with another compiler and it worked. Thank you very much for your explanation.
  22. Replies
    5
    Views
    511

    Then is it normal that it doesn't work?

    Then is it normal that it doesn't work?
  23. Replies
    5
    Views
    511

    %a Specifier with scanf?

    Hello all,

    I am trying to learn the specifiers for the I/O functions. I have read that C99 added %a specifier to read floating-point numbers. However I cannot use it. What can be wrong? The code...
  24. Replies
    17
    Views
    2,060

    Thanks for your answer but just to make sure I...

    Thanks for your answer but just to make sure I want to show you something I found: "default argument promotion in variadic functions"

    Gavin Smith's Blog: Notes on C default argument promotions and...
  25. Replies
    17
    Views
    2,060

    Thank you very much for your answer. I am OK with...

    Thank you very much for your answer. I am OK with the last two examples.

    "%d with char (char is automatically promoted to int in expressions therefore it will display the correct value)" Do I need...
Results 1 to 25 of 113
Page 1 of 5 1 2 3 4