-
-
-
-
-
How to call C++ code from C ?
How can I call my C++ code from C code can you point me to some examples that are explained in detail.ThanksAjit
-
-
-
-
-
-
-
-
-
-
Point out the error in the following program main() { const int x; x=128; printf("%d",x); }
x should have been initialized where it is declared.
-
Point out the error in the following program main() { int a=10; void f(); a=f(); printf("n%d",a); } void f() { printf("nHi"); }
The program is trying to collect the value of a "void" function into an integer variable.
-
-
else
printf("I hate U");
}
">Iii) main(){ float me = 1.1; double you = 1.1; if(me==you)printf("I love U");else printf("I hate U");}
I hate UExplanation:For floating point numbers (float, double, long double) the values cannot be predicted exactly. Depending on the number of bytes, the precession with of the value represented varies. Float takes 4 bytes and long double takes 10 bytes. So float stores 0.9 with less precision than long double.Rule of Thumb: Never compare or at-least be cautious when using floating point numbers with...
-
-
C Interview Questions
Ans