Discussion :: Structures, Unions, Enums - Point Out Correct Statements (Q.No.1)
|Gopi said: (Jan 1, 2011)|
|Can any one explain this ?|
|Neo said: (Jul 7, 2013)|
|Can anyone please explain the "e[i].name" used in scanf() without '&'?|
|Vimalmohandas said: (Sep 17, 2013)|
|"e[i].name" pointing to address already hence we are not using "&" in scanf().|
|Neha said: (Mar 13, 2014)|
|Using string we don't need there "&" in scanf().|
|Soumya Sharma said: (Apr 12, 2014)|
|Can any one explain me why answer C is correct with suitable example. How we can correctly?|
|Ratan said: (Sep 29, 2015)|
|On deleting last for loop and scanf statements, error remains same, then why these extra codes.|
|Chintan said: (Dec 13, 2015)|
|1 > not floating point error in gcc.
2 > in second for loop the scanf() not write &.
scanf ("%s %d %f", e[i].name, e[i].age, e[i].sal);
So compile successfully but give runtime error solution.
|Ratan Lal said: (Apr 11, 2016)|
|This will run correctly in GCC, if we will apply the address operator to e[i].age and e[i].sal in second scanf statement .
e[i].age should be &e[i].age
e[i].sal should be &e[i].sal
|Deepa Khandelwal said: (Jul 28, 2016)|
|How/ Why the answer is option c?|
|Robert said: (Aug 23, 2016)|
scanf ("%d", &a);
Agree with @Ratan In GCC it works smoothly.
|Hardik Chugh said: (Oct 25, 2017)|
|Run time error occurs in GCC compiler. Can anyone explain this?|
Post your comments here:
Email : (optional)
» Your comments will be displayed only after manual approval.