Question Set

1. Size of short integer and long integer can be verified using the sizeof() operator.



Ask Your Doubts Here

Type in
(Press Ctrl+g to toggle between English and the chosen language)

Comments

  • By: guest on 01 Jun 2017 06.01 pm
    True, we can find the size of short integer and long integer using the sizeof() operator.
    Example: #include<stdio.h> int main() { short int i = 10; long int j = 10; printf("short int is %d bytes.,\nlong int is %d bytes.", sizeof(i),sizeof(j)); return 0; } Output:
    short int is 2 bytes.
    long int is 4 bytes.
Show Similar Question And Answers
QA->Raj can do a piece of work in 5 hours. Hari and Siva can do it in 3 hours. Raj and Siva can do it in 4 hours. How long will Hari take to do it ?....
QA->Raj can do a piece of work in 5 hours. Hari and Siva can do it in 3 hours. Raj and Siva can do it in 4 hours. How long will Hari take to do it ?....
QA->P can do a work in the same time in which Q and R together can do it. If P and Q work together, the work can be completed in 10 days. R alone needs 50 days to complete the same work. then Q alone can do it in....
QA->A and B can do a work in 10 days, B and C can do it in 12 days, C and A can do it in 15 days. If A, B, and C work together, they will complete the work in:....
QA->A and B can do a work in 10 days. B and C can do it in 12 days. C and A can do it in 15 days. If A, B, and C work together, then the work will complete....
MCQ->What will be the output of the program? public class WrapTest { public static void main(String [] args) { int result = 0; short s = 42; Long x = new Long("42"); Long y = new Long(42); Short z = new Short("42"); Short x2 = new Short(s); Integer y2 = new Integer("42"); Integer z2 = new Integer(42); if (x == y) / Line 13 / result = 1; if (x.equals(y) ) / Line 15 / result = result + 10; if (x.equals(z) ) / Line 17 / result = result + 100; if (x.equals(x2) ) / Line 19 / result = result + 1000; if (x.equals(z2) ) / Line 21 / result = result + 10000; System.out.println("result = " + result); } }....
MCQ->Size of short integer and long integer can be verified using the sizeof() operator.....
MCQ->Which of the following statements are correct about the Bitwise & operator used in C#.NET? The & operator can be used to Invert a bit. The & operator can be used to put ON a bit. The & operator can be used to put OFF a bit. The & operator can be used to check whether a bit is ON. The & operator can be used to check whether a bit is OFF.....
MCQ->If the size of pointer is 32 bits What will be the output of the program ? #include<stdio.h> int main() { char a[] = "Visual C++"; char b = "Visual C++"; printf("%d, %d\n", sizeof(a), sizeof(b)); printf("%d, %d", sizeof(a), sizeof(b)); return 0; }....
MCQ->If the size of integer is 4bytes, What will be the output of the program? #include<stdio.h> int main() { int arr[] = {12, 13, 14, 15, 16}; printf("%d, %d, %d\n", sizeof(arr), sizeof(arr), sizeof(arr[0])); return 0; }....
Terms And Service:We do not guarantee the accuracy of available data ..We Provide Information On Public Data.. Please consult an expert before using this data for commercial or personal use | Powered By:Omega Web Solutions
© 2002-2017 Omega Education PVT LTD...Privacy | Terms And Conditions
Question ANSWER With Solution