Jobs in India
Search Jobs
Search Jobs
Advertisements

SOE-CUSAT ,27 August 2009 by SUBEX

Details of SOE-CUSAT ,27 August 2009 by SUBEX conducted by SUBEX for job interview.
Advertisements
Paper Code-COT2
Q1.
#include
main()
{
float a =3.56;
printf("%d",int(a));
}
Answer -3
Q2.
#define SQUARE(X) X*X;
#include
main()
{
int x=4;
int y=SQUARE(X)/x*x;
printf("%d",y);
}
Answer -64
Q3.
#define TRUE 1
#define FALSE -1
#define NULL 0;
main()
{
if(NULL)
printf("NULL");
else if(FALSE)
printf("TRUE");
else if(TRUE)
printf("FALSE");
}
Answer TRUE
Q4:
#include
void main()
{
show();
}
void show()
{
printf("HEllo");
}
Ans- Error :(Prototype not defined)
Q5:
#include
void main()
{
char *ch="hello";
printf("%s",strcat(ch , !));
}
Answer- Error.....because ! should be " ! "( ! should be string)
Q6:
The command line arguments are myprogram 1 2 3
#include
void main(argc, char *argv[])
{
int i;
int sum=0;
for(i=0;i