ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
info       Did you received any Funny E-Mails from your Friends and like to share with rest of our friends? Yeah!! you can post that stuff   HERE
Google
 
Categories  >>  Code Snippets  >>  Programming Code  >>  C Code
 
 


 

 
 C Code interview questions  C Code Interview Questions
 C++ Code interview questions  C++ Code Interview Questions
 VC++ Code interview questions  VC++ Code Interview Questions
 Java Code interview questions  Java Code Interview Questions
 Dot Net Code interview questions  Dot Net Code Interview Questions
 Visual Basic Code interview questions  Visual Basic Code Interview Questions
 Programming Code AllOther interview questions  Programming Code AllOther Interview Questions
Question
main()

	{

	int k=1;

	printf("%d==1 is ""%s",k,k==1?"TRUE":"FALSE");

	}
 Question Submitted By :: Susie
I also faced this Question!!     Rank Answer Posted By  
 
  Re: main() { int k=1; printf("%d==1 is ""%s",k,k==1?"TRUE":"FALSE"); }
Answer
# 1
Answer : 

      1==1 is TRUE

      Explanation:

When two strings are placed together (or separated by
white-space) they are concatenated (this is called as
"stringization" operation). So the string is as if it is
given as "%d==1 is %s". The conditional operator( ?: )
evaluates to "TRUE".
 
Is This Answer Correct ?    0 Yes 0 No
Susie
 

 
 
 
Other C Code Interview Questions
 
  Question Asked @ Answers
 
char *someFun1() { char temp[ ] = “string"; return temp; } char *someFun2() { char temp[ ] = {‘s’, ‘t’,’r’,’i’,’n’,’g’}; return temp; } int main() { puts(someFun1()); puts(someFun2()); }  1
main() { float f=5,g=10; enum{i=10,j=20,k=50}; printf("%d\n",++k); printf("%f\n",f<<2); printf("%lf\n",f%g); printf("%lf\n",fmod(f,g)); }  1
enum colors {BLACK,BLUE,GREEN} main() { printf("%d..%d..%d",BLACK,BLUE,GREEN); return(1); }  1
Write a prog to accept a given string in any order and flash error if any of the character is different. For example : If abc is the input then abc, bca, cba, cab bac are acceptable, but aac or bcd are unacceptable. Microsoft5
1. const char *a; 2. char* const a; 3. char const *a; -Differentiate the above declarations.  2
main() { char *cptr,c; void *vptr,v; c=10; v=0; cptr=&c; vptr=&v; printf("%c%v",c,v); }  1
char *someFun() { char *temp = “string constant"; return temp; } int main() { puts(someFun()); }  1
main() { char str1[] = {‘s’,’o’,’m’,’e’}; char str2[] = {‘s’,’o’,’m’,’e’,’\0’}; while (strcmp(str1,str2)) printf(“Strings are not equal\n”); }  1
main() { int i=300; char *ptr = &i; *++ptr=2; printf("%d",i); }  1
main() { int i; i = abc(); printf("%d",i); } abc() { _AX = 1000; }  1
What is the output of the program given below main() { signed char i=0; for(;i>=0;i++) ; printf("%d\n",i); }  1
#include<stdio.h> main() { struct xx { int x; struct yy { char s; struct xx *p; }; struct yy *q; }; }  1
How do I write a program to print proper subset of given string . Eg :input: abc output:{},{a},{b},{c},{a,b},{a,c},{b,c}, {a,b,c}.I desperately need this program please mail me to saravana6m@gmail.com Deshaw9
void main() { static int i=5; if(--i){ main(); printf("%d ",i); } }  1
void main() { int i=5; printf("%d",i++ + ++i); }  1
struct Foo { char *pName; char *pAddress; }; main() { struct Foo *obj = malloc(sizeof(struct Foo)); clrscr(); obj->pName = malloc(100); obj->pAddress = malloc(100); strcpy(obj->pName,"Your Name"); strcpy(obj->pAddress, "Your Address"); free(obj); printf("%s", obj->pName); printf("%s", obj->pAddress); } a. Your Name, Your Address b. Your Address, Your Address c. Your Name Your Name d. None of the above HCL1
Write a function to find the depth of a binary tree. Adobe8
1 o 1 1 0 1 0 1 0 1 1 0 1 0 1 how to design this function format in c-language ?  1
main() { char name[10],s[12]; scanf(" \"%[^\"]\"",s); } How scanf will execute?  1
main() { int i, j; scanf("%d %d"+scanf("%d %d", &i, &j)); printf("%d %d", i, j); } a. Runtime error. b. 0, 0 c. Compile error d. the first two values entered by the user HCL1
 
For more C Code Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com