Complicated Declarations Questions and Answers updated daily – C Language



15 Complicated Declarations Questions and answers section with explanation for various online exam preparation, various interviews, C Language Complicated Declarations online test. Complicated Declarations Questions with detailed description, explanation will help you to master the topic.

Complicated Declarations Questions

1.
What will be the output of the program?

#include<stdio.h>

int main()
{
    char huge *near *far *ptr1;
    char near *far *huge *ptr2;
    char far *huge *near *ptr3;
    printf("%d, %d, %dn", sizeof(ptr1), sizeof(*ptr2), sizeof(**ptr3));
    return 0;
}



SHOW ANSWER
Correct Ans:4,4,4
Explanation:


2.
     What will be the output of the program?

#include
typedef void v;
typedef int i;

int main()
{
    v fun(i, i);
    fun(2, 3);
    return 0;
}
v fun(i a, i b)
{
    i s=2;
    float i;
    printf("%d,", sizeof(i));
    printf(" %d", a*b*s);
}



SHOW ANSWER
Correct Ans:4,12
Explanation:


3.
What will be the output of the program?

#include<stdio.h>

int main()
{
    char huge *near *far *ptr1;
    char near *far *huge *ptr2;
    char far *huge *near *ptr3;
    printf("%d, %d, %dn", sizeof(**ptr1), sizeof(ptr2), sizeof(*ptr3));
    return 0;
}



SHOW ANSWER
Correct Ans:4,4,4
Explanation:


4.
What will be the output of the program in DOS (Compiler - Turbo C)?

#include<stdio.h>
double i;

int main()
{
    (int)(float)(char) i;
    printf("%d", sizeof((int)(float)(char)i));
    return 0;
}



SHOW ANSWER
Correct Ans:2
Explanation:
Due to the C language is being platform dependent:

In Turbo C (DOS - 16 bit platform), the output will be 2.

But in GCC (Unix/Linux - 32 bit platform), the output will be 4.


5.
What will be the output of the program?

#include<stdio.h>

int main()
{
    char far *near *ptr1;
    char far *far *ptr2;
    char far *huge *ptr3;
    printf("%d, %d, %dn", sizeof(ptr1), sizeof(ptr2), sizeof(ptr3));
    return 0;
}



SHOW ANSWER
Correct Ans:2,4,4
Explanation:


6.
    What do the following declaration signify?

char *scr;



SHOW ANSWER
Correct Ans:scr is a pointer to char.
Explanation:


7.
What do the following declaration signify?

char **argv;



SHOW ANSWER
Correct Ans:argv is a pointer to a char pointer.
Explanation:


8.
What do the following declaration signify?

void (*cmp)();



SHOW ANSWER
Correct Ans:cmp is a pointer to a function which returns void .
Explanation:


9.
What do the following declaration signify?

int *f();



SHOW ANSWER
Correct Ans:f is a function returning pointer to an int
Explanation:


10.
Declare the following statement?
"A pointer to a function which receives an int pointer and returns float pointer".



SHOW ANSWER
Correct Ans:float *(*ptr)(int*)
Explanation:


11.
What do the following declaration signify?

int (*pf)();



SHOW ANSWER
Correct Ans:pf is a pointer to a function which return int
Explanation:


12.
What do the following declaration signify?

char *arr[10];



SHOW ANSWER
Correct Ans:arr is a array of 10 character pointers.
Explanation:


13.
Declare the following statement?
"A pointer to an array of three chars".



SHOW ANSWER
Correct Ans:char (*ptr)[3];
Explanation:


14.
What do the following declaration signify?

int *ptr[30];



SHOW ANSWER
Correct Ans:ptr is a array of 30 pointers to integers.
Explanation:


15.
Declare the following statement?
"An array of three pointers to chars".



SHOW ANSWER
Correct Ans:char *ptr[3];
Explanation:


Are you seeking for good platform for practicing Complicated Declarations questions in online. This is the right place. The time you spent in Fresherslive will be the most beneficial one for you.

Online Test on Complicated Declarations @ Fresherslive

This page provides important questions on Complicated Declarations along with correct answers and clear explanation, which will be very useful for various Interviews, Competitive examinations and Entrance tests. Here, Most of the Complicated Declarations questions are framed with Latest concepts, so that you may get updated through these Complicated Declarations Online tests. Complicated Declarations Online Test questions are granted from basic level to complex level.

Why To Practice Complicated Declarations Test questions Online @ Fresherslive?

Complicated Declarations questions are delivered with accurate answer. For solving each and every question, very lucid explanations are provided with diagrams wherever necessary.

Practice in advance of similar questions on Complicated Declarations may improve your performance in the real Exams and Interview.

Time Management for answering the Complicated Declarations questions quickly is foremost important for success in Competitive Exams and Placement Interviews.

Through Fresherslive Complicated Declarations questions and answers, you can acquire all the essential idea to solve any difficult questions on Complicated Declarations in short time and also in short cut method.

Winners are those who can use the simplest method for solving a question. So that they have enough time for solving all the questions in examination, correctly without any tense. Fresherslive provides most simplest methods to answer any tough questions. Practise through Fresherslive test series to ensure success in all competitive exams, entrance exams and placement tests.

Why Fresherslive For Complicated Declarations Online Test Preparation?

Most of the job seekers finding it hard to clear Complicated Declarations test or get stuck on any particular question, our Complicated Declarations test sections will help you to success in Exams as well as Interviews. To acquire clear understanding of Complicated Declarations, exercise these advanced Complicated Declarations questions with answers.

You're Welcome to use the Fresherslive Online Test at any time you want. Start your beginning, of anything you want by using our sample Complicated Declarations Online Test and create yourself a successful one. Fresherslive provides you a new opportunity to improve yourself. Take it and make use of it to the fullest. GOODLUCK for Your Bright Future.


FreshersLive - No.1 Job site in India. Here you can find latest 2017 government as well as private job recruitment notifications for different posts vacancies in India. Get top company jobs for both fresher and experienced. Job Seekers can get useful interview tips, resume services & interview Question and answer. Practice online test free which is helpful for interview preparation. Register with us to get latest employment news/rojgar samachar notifications. Also get latest free govt and other sarkari naukri job alerts daily through E-mail.