(i) Write the Following Code Correctly:
#include <studio.h>int main() {
int color_1, 2_color;
scanf(" %lf %d",color_1,2_color);
color_1=%2_color;
printf("Result = %d\n,num1");
(ii) Write the Following Code Correctly:
#include<math.h>int main(); {
int a, b=2.0;
float _q;
scanf("%lf",b);
b=/5;
printf("%d\n,a”);
return 0;
}
(iii) Find errors (if any) in the following statements:
(a) Int x = '15'(b) char B = "B"
(c) Char abc, DIGIT, _LeT3r;
(d) int a,9_b;c_9;9d;
(e) char a = '3';
(f) m = ++a++;
(g) a %= 30;
(h) x =/ 9;
(i) int a = b, c = -10;
(j) if ( a != b && ! (b/10 == 6) )
(k) Scan("%d%d",a,b);
(l) printf("%d%d",a,b,\n);
download file in here
ReplyDeleteNice
ReplyDelete