AmbitionBox
Discover Best Places to work in India
Discover best places to work
Compare & find best workplace
Bring your workplace to life
Highlight your company's perks
Read reviews for 6L+ companies
Rate your former or current company
Discover salaries for 8L+ companies
Calculate your take home salary
Check your market value
Help other jobseekers
Read interviews for 90K+ companies
Interviews questions for 1K+ colleges
Contribute your interview questions
C Programming
What is x in the following program?
#include < stdio . h >int main() { typedefchar (*(*arrfptr[3])())[10]; arrfptr x; return0; }
x is a pointer
x is an array of three pointer
x is an array of three function pointers
Error in x declaration
Option C
What will be the output of the program?
#includetypedefstruct error {int warning, err, exception;} ERROR; int main() { ERROR e; e.err=1; printf("%d\n", e.err); return0; }
0
1
2
Error
Option B
#include <stdio.h>
typedefstruct student
{
char*a;
}stu;
void main()
struct stu s;
s.a="hi";
printf("%s", s.a);
}
Compile time error
Varies
hi
h
Answer: Option A
What is the output of this C code?
struct student s;
s.a="hey";
he
hey
Answer: Option D
typedefint integer;
int main()
int i =10,*ptr;
float f =20;
integer j = i;
ptr =&j;
printf("%d\n",*ptr);
return0;
Undefined behaviour
Depends on the standard
10
Join India’s largest community to research company culture
Are you a student or working professional?
Student/Never worked
I am a student/I have never worked
Working Professional
I am working/I have worked before
What are your preferred job locations?
Popular Cities
Other Cities
Follow your preferred designations/job profiles
Suggestions based on your job profile
vs
Similar Companies