0

I have seen this line of code recently in C language

main(c,p,i)

What this was doing was declaring c as character and i, p as integers. This was working alright but I couldn't understand how. Can anyone help me here?

Magnus Hoff
  • 21,529
  • 9
  • 63
  • 82
Neeraj Kumar
  • 803
  • 2
  • 8
  • 11
  • I don't find the cited previous answer very helpful. – Jiminion May 19 '14 at 19:54
  • 1
    The question is unclear. `main(c,p,i)` does not specify types at all. It's also not specified whether this bit of code is from a function declaration, function definition, or function call. – nobody May 19 '14 at 19:57
  • @BlueMoon, was the correct duplicate indicated? – Mahonri Moriancumer May 19 '14 at 20:05
  • Perhaps this is a link to the referenced code? https://github.com/dbarbosa/Coding/blob/master/spoj/KAMIL.c --which is a fantastic example of very bad coding. – Mahonri Moriancumer May 19 '14 at 20:09
  • @MahonriMoriancumer Yes. There are some more dups...this one has by far the complete answer. May be, the question title doesn't seem obvious but the answers are. Do you find that it doesn't answer this question? – P.P May 19 '14 at 20:14
  • @BlueMoon, are you referring to the reference: `...as the types for foo, p, and q default to int.`? I agree that this might answer part of the question. However, I don't believe that those who wish to see the answer to this question will be successful at uncovering that gem of information. (...Well, perhaps now they will). – Mahonri Moriancumer May 19 '14 at 20:27

0 Answers0