Sail E0 Webinar

MCQs

Total Questions : 63 | Page 7 of 7 pages
Question 61.

What will be output if you compile following c code ?


#include<stdio.h>
int funct1(int a)
{{;}{{;}return a;}}
void main()
{
int a=17;
printf("%d",funct1(a));
}


  1.    Compile Error
  2.    0
  3.    17
  4.    None of these
 Discuss Question
Answer: Option C. -> 17



Question 62.

What will be output if you compile following c code ?


#include<stdio.h>
int compute(int a,int b)
int c;
{
c=a+b;
return c;
}
void main()
{
int a=7,b=9;
printf("%d",compute(a,b));
}


  1.    Compile Error
  2.    16
  3.    0
  4.    None of these
 Discuss Question
Answer: Option A. -> Compile Error



Question 63.

What will be output if you compile following c code ?


#include<stdio.h>
int funct(char ch)
{
ch=ch+1;
return ch;
}
void main()
{
int a=127;
printf("%d %d",a,funct(a));
}


  1.    Compile Error
  2.    127 128
  3.    127 -128
  4.    None of these
 Discuss Question
Answer: Option C. -> 127 -128



Latest Videos

Latest Test Papers