What will be the output of the program?
#include
int main()
{
typedef int LONG;
LONG a=4;
LONG b=68;
float c=0;
c=b;
b+=a;
printf("%d,", b);
printf("%f\n", c);
retu
Answer: A
No answer description available for this question.
Enter details here
What is x in the following program?
#include
int main()
{
typedef char (*(*arrfptr[3])())[10];
arrfptr x;
return 0;
}
Answer: C
No answer description available for this question.
Enter details here
Which of the following may create problem in the typedef program?
Answer: D
No answer description available for this question.
Enter details here
In the following code, the P2 is Integer Pointer or Integer?
typedef int *ptr;
ptr p1, p2;
Answer: B
No answer description available for this question.
Enter details here
Choose the statement which is incorrect with respect to dynamic memory allocation.
Answer: C
No answer description available for this question.
Enter details here
The size of both stack and heap remains the same during run time.
Answer: B
Memory can be allocated or de-allocated during the run time in the heap region. Memory bindings (allocation and de-allocation) are established and destroyed during the execution of the program. Hence we can see that the size of heap does not remain same during run time. However, the size of stack remains the same.
Enter details here
Which of the given option is the correct method for initialization?
typedef char *string;
Answer: B
No answer description available for this question.
Enter details here
For the following expression to work, which option should be selected.
string p = “HELLO”;
Answer: B
No answer description available for this question.
Enter details here
What will be the output of the following C code? (If the name entered is: Sanfoundry)
#include
#include
typedef struct employee
{
char name[50];
int salary;
} e1;
void main( )
{
printf("Enter Employee name");
scanf("%s",e1.name);
printf("\n%s",e1.name);
}
Answer: D
The code shown above will result in an error because we have used the data type e1 (defined using the keyword typedef) in the form of an identifier.
Enter details here
“typedef” in C basically works as an alias. Which of the following is correct for “typedef”?
Answer: D
No answer description available for this question.
Enter details here