Sail E0 Webinar

MCQs

Total Questions : 209 | Page 4 of 21 pages
Question 31. Determine Output:#includevoid main(){ register i=5; char j[]= "hello"; printf("%s %d", j, i);}
  1.    Error
  2.    None of These
  3.    hello 5
  4.    hello garbage value
 Discuss Question
Answer: Option C. -> hello 5
Question 32. Determine Output:void main(){ char not; not = !2; printf("%d", not);}
  1.    None of These
  2.    2
  3.    Garbage Value
  4.    0
 Discuss Question
Answer: Option D. -> 0
Question 33. Determine Output:void main(){ int i = -1; +i; printf("i = %d, +i = %d", i, +i);}
  1.    i = -1, +i = -1
  2.    i = 1, +i = 1
  3.    i = -1, +i = 1
  4.    None of These
 Discuss Question
Answer: Option A. -> i = -1, +i = -1
Question 34. Determine Output:void main(){ char *str1 = "abcd"; char str2[] = "abcd"; printf("%d %d %d", sizeof(str1), sizeof(str2), sizeof("abcd"));}
  1.    5 5 5
  2.    2 4 4
  3.    2 4 5
  4.    2 5 5
 Discuss Question
Answer: Option D. -> 2 5 5
Question 35. Determine Output:void main(){ int i=5, j=6, z; printf("%d", i+++j);}
  1.    None of These
  2.    13
  3.    12
  4.    11
 Discuss Question
Answer: Option D. -> 11
Question 36. Determine Output:void main(){ int i = abc(10); printf("%d", --i);}int abc(int i){ return(i++);}
  1.    9
  2.    None of These
  3.    10
  4.    11
 Discuss Question
Answer: Option A. -> 9
Question 37. Determine Output:void main(){ char a[]="12345"; int i = strlen(a); printf("%d", ++i);}
  1.    6
  2.    7
  3.    5
  4.    None of These
 Discuss Question
Answer: Option A. -> 6
Question 38. Determine Output:void main(){ int i=i++, j=j++, k=k++; printf("%d %d %d", i, j, k);}
  1.    Error
  2.    1 1 1
  3.    garbage values
  4.    0 0 0
 Discuss Question
Answer: Option C. -> garbage values
Question 39. Determine Output:void main(){ int i; char a[]="�"; if(printf("%sn", a)) printf("Ok here n"); else printf("Forget itn");}
  1.    None of These
  2.    Ok here
  3.    Error
  4.    Forget it
 Discuss Question
Answer: Option B. -> Ok here
Question 40. Determine Output:void main(){ static int i=i++, j=j++, k=k++; printf("%d %d %d", i, j, k);}
  1.    1 1 1
  2.    garbage values
  3.    Error
  4.    0 0 0
 Discuss Question
Answer: Option A. -> 1 1 1

Latest Videos

Latest Test Papers