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                      
tip   To Refer this Site to Your Friends   Click 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
int i,j;

	for(i=0;i<=10;i++)

	{

	j+=5;

	assert(i<5);

	}
 Question Submitted By :: Susie
I also faced this Question!!     Rank Answer Posted By  
 
  Re: int i,j; for(i=0;i<=10;i++) { j+=5; assert(i<5); }
Answer
# 1
Answer :  

      Runtime error: Abnormal program termination. 

			assert failed (i<5), <file name>,<line number> 

      Explanation:

asserts are used during debugging to make sure that certain
conditions are satisfied. If assertion fails, the program
will terminate reporting the same. After debugging use,

      	#undef NDEBUG

      and this will disable all the assertions from the
source code. Assertion

      is a good debugging tool to make use of.
 
Is This Answer Correct ?    0 Yes 0 No
Susie
 

 
 
 
Other C Code Interview Questions
 
  Question Asked @ Answers
 
#include<stdio.h> main() { int a[2][2][2] = { {10,2,3,4}, {5,6,7,8} }; int *p,*q; p=&a[2][2][2]; *q=***a; printf("%d----%d",*p,*q); }  1
main(){ int a= 0;int b = 20;char x =1;char y =10; if(a,b,x,y) printf("hello"); }  1
#define int char main() { int i=65; printf("sizeof(i)=%d",sizeof(i)); }  1
main() { char *p="hai friends",*p1; p1=p; while(*p!='\0') ++*p++; printf("%s %s",p,p1); }  1
void main () { int x = 10; printf ("x = %d, y = %d", x,--x++); } a. 10, 10 b. 10, 9 c. 10, 11 d. none of the above HCL1
main() { char a[4]="HELL"; printf("%s",a); } Wipro1
main() { 41printf("%p",main); }8  1
main() { char *p = "hello world"; p[0] = 'H'; printf("%s", p); } a. Runtime error. b. “Hello world” c. Compile error d. “hello world” HCL1
Given n nodes. Find the number of different structural binary trees that can be formed using the nodes. Aricent7
#define square(x) x*x main() { int i; i = 64/square(4); printf("%d",i); }  1
main() { int i = 3; for (;i++=0;) printf(“%d”,i); }  1
main() { int i = 257; int *iPtr = &i; printf("%d %d", *((char*)iPtr), *((char*)iPtr+1) ); }  1
How we print the table of 3 using for loop in c programing?  3
What is "far" and "near" pointers in "c"...?  3
char *someFun() { char *temp = “string constant"; return temp; } int main() { puts(someFun()); }  1
Give a one-line C expression to test whether a number is a power of 2. Microsoft8
What is the output of the program given below main() { signed char i=0; for(;i>=0;i++) ; printf("%d\n",i); }  1
print numbers till we want without using loops or condition statements like specifically(for,do while, while swiches, if etc)!  7
Is the following code legal? typedef struct a { int x; aType *b; }aType  1
int i; main(){ int t; for ( t=4;scanf("%d",&i)-t;printf("%d\n",i)) printf("%d--",t--); } // If the inputs are 0,1,2,3 find the o/p  1
 
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