TCS Company Programming Output

What is the output of this C code?
#define a 20
int main()
{
const int a = 50;
printf("a = %dn", a);
}
1)a=50 2)a=20 3)Run time error 4)Compilation Error

Read Solution (Total 2)

TCS Other Question

Rearrange the following parts (A, B, C and D) in proper sequence to obtain a correct sentence.
A. confirmed that the accused really
B. too many cases still lie
C. pending because it was not
D. is the convict
1)B, C, D, A 2)A, B, C, D 3)B, C, A, D 4)A, B, D, C
Given the below statements about C programming language.
1) main() function should always be the first function present in a C program file
2) all the elements of a union share their memory location
3) A void pointer can hold the address of any type and can be type casted to any type
4) A static variable holds random junk value if it is not initialized
Which of the above are correct statements?
1) 2,3 2) 1,2 3) 1,2,3 4) 1,2,3,4