main()
{
printf("\n %d %d %d",sizeof('3'),sizeof("3"),sizeof(3));
}
wat is the o/p and how?

Answers were Sorted based on User's Feedback



main() { printf("\n %d %d %d",sizeof('3'),sizeof("3"),sizeof(3)); }..

Answer / raj

answer is :1 2 2 ;

size('3')means character constant so it is short int size it
will ocupi 1.

size("3")it will treated as string. 2

size(3) it is integer 2

Is This Answer Correct ?    9 Yes 19 No

main() { printf("\n %d %d %d",sizeof('3'),sizeof("3"),sizeof(3)); }..

Answer / manik

1 2 4

Is This Answer Correct ?    9 Yes 20 No

Post New Answer

More C Interview Questions

how to swap two integers 1 and 32767 without using third variable

11 Answers   Microsoft, TCS,


What is C language Terminator?

15 Answers   TCS,


write a c program to find the sum of five entered numbers using an array named number

0 Answers   TATA,


What is the explanation for the dangling pointer in c?

0 Answers  


What's wrong with "char *p; *p = malloc(10);"?

5 Answers  






In cryptography, you could often break the algorithm if you know what was the original (plain) text that was encoded into the current ciphertext. This is called the plain text attack. In this simple problem, we illustrate the plain text attack on a simple substitution cipher encryption, where you know each letter has been substituted with a different letter from the alphabet but you don’t know what that letter is. You are given the cipherText as the input string to the function getwordSets(). You know that a plain text "AMMUNITION" occurs somewhere in this cipher text. Now, you have to find out which sets of characters corresponds to the encrypted form of the "AMMUNITION". You can assume that the encryption follows simple substitution only. [Hint: You could use the pattern in the "AMMUNITION" like MM occurring twice together to identify this]

0 Answers   Infosys,


What is external variable in c?

0 Answers  


What is pass by value in c?

0 Answers  


How can I remove the trailing spaces from a string?

0 Answers   Aspire,


what is default constructor?

2 Answers   HCL,


What are operators in c?

0 Answers  


What is the difference between typeof(foo) and myFoo.GetType()?

2 Answers   Synergy,


Categories