Computers Test
Description: The beginners who wants to start their career in the field of Information Technology | |
Number of Questions: 19 | |
Created by: Trisha Prashad | |
Tags: IT Information Technology Programming |
What would be the output of the following program?
main() { char *str,*str1="I Love You"; str=malloc(strlen(str1)); strcpy(str,str1); printf("%s",str); free(str); }
The header file which includes stdarg.h is_____________
What are the types of variable f2 and p2 in the following declaration?
#define floatptr float * #define int * intptr
floatptr f1,f2; intptr p1,p2;
_______________ is a direct interface to the DOS call 0x44.
chmod() function is defined in which header file?
What would be the output of the following?
void main() { int z,x=5,y=-10,a=4,b=2; z=x++ - --y *b/a; printf("%d",z); }
In C, what is the difference between a declaration and definition of a variable?
struct node nptr,*sptr; /*pointers for linked list/ for(nptr=sptr;nptr;nptr=nptr->next) { free(nptr); }
sizeof is an ________________
What would be the output of the following?
char *fun(char *ptr) { ptr+=3; return(ptr); } void main() { char *x,*y; x="Hello"; y=fun(x); printf("%s",y); }
. and -> are __________ operators.
What would be the output of the following?
void main() { int a=10,b; b=a++ + ++a; printf("%d %d %d %d",b,a++,a,++a); }
The longjmp cannot pass the value
What would be the output of the following?
main() { int i=strlen("Blue")+strlen("Purple")/strlen("Red")-strlen("Green"); printf("%d",i); }
What would be the output of the following?
main() { int val1=1234; int val2=01234; printf(%d %d,val1,val2); }
The scope of a global variable which is declared as __________ is within the file.
What would be the output of the following?
main() { int i,j; for(i=0;;i++) for(j=0;;j++) if(j>100) break; printf("%d%d",i,j); }
What would be the output of the following?
main() { int y,x=5; y=++x - ++x; printf("%d%d",x,y); }
What would be the output of the following?
void main() { int a=10,b; b=a++ + ++a; printf("%d %d %d %d",b,a++,a,++a); }What would be the output of the following?
void main() { int i=7; printf("%old %old %old %old",i,i++,i--,i++); getch(); }