Identify which of the following are declarations
| 1 : | extern int x; |
| 2 : | float square ( float x ) { ... } |
| 3 : | double pow(double, double); |
Is there any difference between following declarations?
| 1 : | extern int fun(); |
| 2 : | int fun(); |
What is the output of the program
#include<stdio.h>
int main()
{
struct emp
{
char name[20];
int age;
float sal;
};
struct emp e = {"Tiger"};
printf("%d, %f\n", e.age, e.sal);
return
}
In the following program where is the variable a getting defined and where it is getting declared?
#include<stdio.h>
int main()
{
extern int a;
printf("%d\n", a);
return}
int a=How would you round off a value from 1.to 2.0?
What is the output of the program?
#include<stdio.h>
int main()
{
union a
{
int i;
char ch[2];
};
union a u;
u.ch[= u.ch[= printf("%d, %d, %d\n", u.ch[0], u.ch[1], u.i);
return}