C Programming What will be printed after compiling and running the following code?main() { char *p; printf("%d %d",sizeof(*p), sizeof(p));} 1 2 2 2 1 1 2 1 1 2 2 2 1 1 2 1 ANSWER DOWNLOAD EXAMIANS APP
C Programming What will be the output?main() { char *p; p = "Hello"; printf("%cn",*&*p); } Hello None of these. H Some address will be printed Hello None of these. H Some address will be printed ANSWER DOWNLOAD EXAMIANS APP
C Programming What is the output of given program if user enter "xyz" ?#includevoid main(){float age, AgeInSeconds;int value;printf("Enter your age:");value=scanf("%f", &age);if(value==0){printf("\\nYour age is not valid");}AgeInSeconds = 365 * 24 * 60 * 60 * age;printf("\\n You have lived for %f seconds", AgeInSeconds);} Enter your age : xyz Your age is not valid Complier error Enter your age: xyz You have lived for 0 seconds Enter your age: xyz Your age is not valid Enter your age : xyz Your age is not valid Complier error Enter your age: xyz You have lived for 0 seconds Enter your age: xyz Your age is not valid ANSWER DOWNLOAD EXAMIANS APP
C Programming What is the difference between a declaration and a definition of a variable? A definition occurs once, but a declaration may occur many times. Both can occur multiple times, but a declaration must occur first. A declaration occurs once, but a definition may occur many times. Both can occur multiple times, but a definition must occur first. There is no difference between them. A definition occurs once, but a declaration may occur many times. Both can occur multiple times, but a declaration must occur first. A declaration occurs once, but a definition may occur many times. Both can occur multiple times, but a definition must occur first. There is no difference between them. ANSWER DOWNLOAD EXAMIANS APP
C Programming Determine Output:void main(){ struct xx { int x=3; char name[] = "hello"; }; struct xx *s = malloc(sizeof(struct xx)); printf("%d", s->x); printf("%s", s->name); } 3 hello Linking error Compiler Error None of these 3 hello Linking error Compiler Error None of these ANSWER DOWNLOAD EXAMIANS APP
C Programming Find the output of the following program.void main(){ int i=10; /* assume address of i is 0x1234ABCD */ int *ip=&i; int **ipp=&&i; printf("%x,%x,%x", &i, ip, *ipp); } Runtime error 0x1234ABCD, 0x1234ABCD, 0x1234ABCD 0x1234ABCD, 10, 10 0x1234ABCD, 0x1234ABCD, 10 Syntax error Runtime error 0x1234ABCD, 0x1234ABCD, 0x1234ABCD 0x1234ABCD, 10, 10 0x1234ABCD, 0x1234ABCD, 10 Syntax error ANSWER DOWNLOAD EXAMIANS APP