Ncr placement paper 1
- By Moderator .
- Published 04/10/2006
- Ncr Placement Papers
-
Rating:




Unrated
Ncr placement paper 1
35)void main() { extern int i; i=20; printf("%d",i); } a)20 b)0 c)compiler error d)linker error 36)float me=0.7; double you=0.7; if(me==you) printf("I luv u"); else printf("I hate u"); 37)Can constructors have return types a)Cant have b)Compiler can internally return values from constructors c)Can jave 38)If pstr is a pointer.Tell which is better. 1)if((length(pstr)>=65) && (pstr!=NULL)) 2)if((pstr!=NULL)&&(length(pstr)>=65)) a)Makes no diff b)Only 1 is correct c)Only 2 is correct d)Both are wrong 39)void main() { static int var=5; printf("%d",var--); if(var) main(); } 40)void main() { int const *p=5; printf("%d",++(*P); } 41)Mr Bean asked to design a student class(in C) to store rollno,name,marks.If the task was given to you ,U would implement using a)Multridimensional array b)structurs c)LL d)stack 42)main() { int c[ ]={2.8,3.4,4,6.7,5}; int j,*p=c,*q=c; for(j=0;j<5;j++) { printf(" %d ",*c); ++q; } for(j=0;j<5;j++){ printf(" %d ",*p); ++p; } } 43)main() { int i=1; switch(i) { default:printf("Default"); break; case 1: printf("one"); case 2: printf("Two"); case 3: printf("Three"); } } a)one b)default c)one two three d)one default 44)Containship is similar to a)Generalization b)inheritance c)Delegation d)Genercity 45)Ternary Operator is 1)?: 2)>= 3)! 4)*
Comments 
This article has been added to your 'Articles to Read' list.