C
Programming and Technical
Programming
Technical
//let header file ok
void main()
{
int i;x=123;
x={printf("c++" "4")};
for(i=0;i<=x;i++);
{
printf("%d",i);
}
}
Read Solution (Total 11)
-
- i think i=0,1,2
in line x=printf(c++,4) -> printf gives the number of operands enclosed within quotes..
so i starting from 0 gets printed till x i.e. 2 - 9 years agoHelpfull: Yes(1) No(0)
- x undefined
- 9 years agoHelpfull: Yes(1) No(1)
- ERROR: 'x' not defined in this scope.
Data type of the variable 'x' is not mentioned. - 9 years agoHelpfull: Yes(0) No(0)
- X does not have a datatype
so datatype error will occur
- 9 years agoHelpfull: Yes(0) No(0)
- error,because ';' is not sppose to keep in initialization after i
- 9 years agoHelpfull: Yes(0) No(0)
- variable x is undefined in program
- 9 years agoHelpfull: Yes(0) No(0)
- error
X is not defined
- 9 years agoHelpfull: Yes(0) No(0)
- error since x is not declared.
- 9 years agoHelpfull: Yes(0) No(0)
- ERROR: Because x is undefined
- 9 years agoHelpfull: Yes(0) No(0)
- main.c:6:7: note: each undeclared identifier is reported only once for each function it appears in
main.c:7:3: error: expected expression before '{' token
x={printf("c++" "4")};
^
- 9 years agoHelpfull: Yes(0) No(0)
- o/p is
0 1 2 3 4
becoz here printf returns thr no of characters of string printed in it i.e., 4 - 9 years agoHelpfull: Yes(0) No(0)
C Other Question