Is the following code legal?
typedef struct a aType;
struct a
{
int x;
aType *b;
};
Answer / susie
Answer :
Yes
Explanation:
The typename aType is known at the point of declaring the
structure, because it is already typedefined.
| Is This Answer Correct ? | 4 Yes | 0 No |
How to return multiple values from a function?
Is the following code legal? typedef struct a aType; struct a { int x; aType *b; };
#define DIM( array, type) sizeof(array)/sizeof(type) main() { int arr[10]; printf(“The dimension of the array is %d”, DIM(arr, int)); }
main() { signed int bit=512, mBit; { mBit = ~bit; bit = bit & ~bit ; printf("%d %d", bit, mBit); } } a. 0, 0 b. 0, 513 c. 512, 0 d. 0, -513
3 Answers HCL, Logical Computers,
Write a program to implement the motion of a bouncing ball using a downward gravitational force and a ground-plane friction force. Initially the ball is to be projected in to space with a given velocity vector
#include<stdio.h> main() { register i=5; char j[]= "hello"; printf("%s %d",j,i); }
why is printf("%d %d %d",i++,--i,i--);
program to Reverse a linked list
12 Answers Aricent, Microsoft, Ness Technologies,
void main() { int i=5; printf("%d",i+++++i); }
What is the main difference between STRUCTURE and UNION?
int main() { int x=10; printf("x=%d, count of earlier print=%d", x,printf("x=%d, y=%d",x,--x)); getch(); } ================================================== returns error>> ld returned 1 exit status =================================================== Does it have something to do with printf() inside another printf().
Code for 1>"ascii to string" 2>"string to ascii"
1 Answers Aricent, Global Logic,