Skip to content

Tag Archives: Data Types

Assume that the size of char is 1 byte and negatives are stored in 2’s complement form #include<stdio.h> int main() {     char c = 125;… Read More
Predict the output of following Java program. class Test {      public static void main(String[] args) {        for(int i = 0; 0; i++)        {            System.out.println("Hello");            break; … Read More
class Main {       public static void main(String args[]) {                int t;                System.out.println(t);      }    } (A) 0 (B)… Read More
Output? int main() {     void *vptr, v;     v = 0;     vptr = &v;     printf("%v", *vptr);     getchar();     return 0; } (A) 0 (B) Compiler Error (C)… Read More
In C, sizes of an integer and a pointer must be same. (A) True (B) False Answer: (B) Explanation: Sizes of integer and pointer are… Read More
Predict the output of following C program #include <stdio.h> int main() {     char a = 012;        printf("%d", a);        return 0; } (A) Compiler… Read More
Predict the output #include <stdio.h>    int main() {    float c = 5.0;    printf ("Temperature in Fahrenheit is %.2f", (9/5)*c + 32);    return 0; }… Read More
Which of the following is not a valid declaration in C? 1. short int x; 2. signed short x; 3. short x; 4. unsigned short… Read More
Predict the output of following program. Assume that the numbers are stored in 2’s complement form. #include<stdio.h>  int  main()  {     unsigned int x = -1; … Read More