#include<stdio.h>
main(0
{
printf("\n %d %d %d",sizeof(3),sizeof("3"),sizeof(3));
}

Answers were Sorted based on User's Feedback



#include<stdio.h> main(0 { printf("\n %d %d %d",sizeof(3),sizeof("3"),..

Answer / nithya

the above code output is

syntax error

this code will be change from

#include<stdio.h>
main()
{
printf("\n %d %d %d",sizeof(3),sizeof("3"),sizeof(3));
}

the out put is

222

Is This Answer Correct ?    9 Yes 1 No

#include<stdio.h> main(0 { printf("\n %d %d %d",sizeof(3),sizeof("3"),..

Answer / a.c.pattanaik

code is error due to declaration

if code is this
main()
{
printf("\n %d %d %d",sizeof(2),sizeof("a"),sizeof(2));
}

Ans-4 2 4

Is This Answer Correct ?    9 Yes 5 No

#include<stdio.h> main(0 { printf("\n %d %d %d",sizeof(3),sizeof("3"),..

Answer / ajay

syntax error

Is This Answer Correct ?    1 Yes 1 No

#include<stdio.h> main(0 { printf("\n %d %d %d",sizeof(3),sizeof("3"),..

Answer / abhishek kumar verma

you have made a typing mistake if code will be this

#include<stdio.h>
main()
{
printf("\n %d %d %d",sizeof(3),sizeof("3"),sizeof(3));
}

then output will be 4 2 4
because in first it will print the size of an integer and in second it will print the size of an string and in third it will print the size of integer again .

Is This Answer Correct ?    4 Yes 5 No

Post New Answer

More C Interview Questions

Print all numbers which has a certain digit in a certain position eg: number=45687 1 number=4 2 number=5 etc

4 Answers  


Tell me can the size of an array be declared at runtime?

0 Answers  


I need testPalindrome and removeSpace #include <stdio.h> #define SIZE 256 /* function prototype */ /* test if the chars in the range of [left, right] of array is a palindrome */ int testPalindrome( char array[], int left, int right ); /* remove the space in the src array and copy it over to the "copy" array */ /* set the number of chars in the "copy" array to the location that cnt points t */ void removeSpace(char src[], char copy[], int *cnt); int main( void ) { char c; /* temporarily holds keyboard input */ char string[ SIZE ]; /* original string */ char copy[ SIZE ]; /* copy of string without spaces */ int count = 0; /* length of string */ int copyCount; /* length of copy */ printf( "Enter a sentence:\n" ); /* get sentence to test from user */ while ( ( c = getchar() ) != '\n' && count < SIZE ) { string[ count++ ] = c; } /* end while */ string[ count ] = '\0'; /* terminate string */ /* make a copy of string without spaces */ removeSpace(string, copy, &copyCount); /* print whether or not the sentence is a palindrome */ if ( testPalindrome( copy, 0, copyCount - 1 ) ) { printf( "\"%s\" is a palindrome\n", string ); } /* end if */ else { printf( "\"%s\" is not a palindrome\n", string ); } /* end else */ return 0; /* indicate successful termination */ } /* end main */ void removeSpace(char src[], char copy[], int *cnt) { } int testPalindrome( char array[], int left, int right ) { }

0 Answers  


What is static memory allocation?

0 Answers  


Study the code: void show() main() { show(); } void show (char *s) { printf("%sn",s); } What will happen if it is compiled & run on an ANSI C Compiler? A)It will compile & nothing will be printed when it is executed B)it will compile but not link C)the compiler will generate an error D)the compiler will generate a warning

4 Answers   Accenture,


What is || operator and how does it function in a program?

0 Answers  


Explain how does flowchart help in writing a program?

0 Answers  


What do you understand by friend-functions? How are they used?

0 Answers   iNautix,


What are global variables?

0 Answers  


Write a C program linear.c that creates a sequence of processes with a given length. By sequence it is meant that each created process has exactly one child. Let's look at some example outputs for the program. Here the entire process sequence consists of process 18181: Sara@dell:~/OSSS$ ./linear 1 Creating process sequence of length 1. 18181 begins the sequence. An example for a sequence of length three: Sara@dell:~/OSSS$ ./linear 3 Creating process sequence of length 3. 18233 begins the sequence. 18234 is child of 18233 18235 is child of 18234 ........ this is coad .... BUt i could not compleate it .....:( #include <stdio.h> #include <sys/types.h> #include <unistd.h> #include <stdlib.h> int main(int argc, char *argv[]) { int N; pid_t pid; int cont; if (argc != 2) { printf("Wrong number of command-line parameters!\n"); return 1; } N = atoi(argv[1]); printf("Creating process sequence of length %d.\n",N); printf("%d begins the sequence.\n",getpid()); /* What I have to do next ?????? */ }

0 Answers  


What does %c mean in c?

0 Answers  


What is data type long in c?

0 Answers  


Categories