C Programming and Problem Solving Questions and Answers 291 to 300

C Programming and Problem Solving

Questions 291 to 300



291.
The size of an int must be greater than or equal to that of a
(a)
long int
(b)
short int
(c)
float
(d)
double
(e)
char.
292.
What is the output of the following statements?
int b=5,c=15,d=8,e=8,a;
a=b>c?c>d?12:d>e?13:14:15;
printf(“%d”,a);
(a)
13
(b)
14
(c)
15
(d)
16
(e)
Garbage value.
293.
Which of the following is not a correct variable type?
(a)
float
(b)
real
(c)
int
(d)
double
(e)
long.
294.
Which of the following is a complete function?
(a)
int funct();
(b)
int funct(int x) {return x=x+1;}
(c)
void funct(int) {cout<<"Hello"}
(d)
void funct(x) {cout<<"Hello"}
(e)
funct( );.
295.
What is the result of the program?
main()
{
int a = 1000, b = 1000;
long int c = a * b;
printf(“%ld”, c);
}
(a)
1000000
(b)
10000
(c)
100000
(d)
Garbage value
(e)
1000.
296.
A file opened in W+ mode can be used in
(a)
Read-write
(b)
Write-read
(c)
Only write
(d)
Only read
(e)
Append.
297.
Which of the following function is used to detect the end of the file?
(a)
feof()
(b)
ferror()
(c)
fputs()
(d)
fgetch()
(e)
freach().
298.
The structure combines variables of
(a)
Dissimilar user-defined data types
(b)
Similar data types
(c)
Unsigned data types
(d)
Signed data types
(e)
Similar signed data types.
299.
Identify the most appropriate sentence to describe Unions.
(a)
Unions contain members of different data types which share the same storage area in memory
(b)
Union are like structures
(c)
Unions are less frequently used in the program
(d)
Unions are used for set operations
(e)
Unions are used for pointers.
300.
Each case statement in switch () is separated by
(a)
break
(b)
continue
(c)
exit()
(d)
go to
(e)
loop.

Answers


291.
Answer : (b)
Reason:  The size of an int must be greater than or equal to that of a short int.
292.
Answer : (c)
Reason:  15 is the required output.
293.
Answer : (b)
Reason:  Real is not a correct variable type.
294.
Answer : (b)
Reason:  int funct(int x) {return x=x+1;} is a complete function.
295.
Answer : (d)
Reason:  Garbage value is displayed as a result.
296.
Answer : (b)
Reason:  A file opened in W+ mode can be used in Write-read.
297.
Answer : (a)
Reason:  feof() function is used to detect the end of the file.
298.
Answer : (a)
Reason:  The structure combines variables of dissimilar user-defined data types.
299.
Answer : (a)
Reason:  Unions contain members of different data types which share the same storage area in memory is the most appropriate sentence to describe Unions.
300.
Answer : (a)
Reason:  Each case statement in switch () is separated by break.



<< Prev 1...  2...  3...  4...  5...  6...  7...  8...  9...  10...  11... 12...  13...  14...  15...  16...  17...  18...  19...  20...  21...  22...  23...  24...  25...  26...  27...  28...  29...  30...  31...  32...  33...  34...  35...  36...  Next >>


12 comments :

  1. "Very nice information about the school, I really like your blog. Please keep sharing this types of blogTop IGCSE school in Mumbai | International School Vashi & Navi Mumbai"

    ReplyDelete
  2. Thanks for sharing this blog. If anyone is thinking that someone can do my harvard referencing style for assignment then, BookMyEssay is a place where we guide students how to complete their assignment effectively and efficiently.

    ReplyDelete
  3. Thanks for sharing your views, you explained it very nicely. If you want a Manufacturing Consultant Freelance developer then, Paperub is a marketplace where you can hire a skilled professional for your important projects.

    ReplyDelete
  4. thanks for sharing he article to us. very good trick used by yo keep sharing like this blog.keep posting like this blogs.
    essay outline help

    ReplyDelete
  5. Nice thought! Rising Damp Treatment happens when water from the ground moves upward through the bricks and mortar of a building due to capillary action. Get a 50% discount on a professional survey for damp issues now.

    ReplyDelete
  6. Are you searching for Accounting Case Study Assignment Help in USA for better grades? Don’t hesitate contact us now! At Case Study Help we all time offer 100% plagiarism free and error free work at students pocket friendly price. For more information visit us now! https://casestudyhelp.com/usa/

    ReplyDelete
  7. NMIMS solved assignment

    Buy NMIMS solved assignment Sep 2023. Get 100% plagiarism free NMIMS solved assignments sep 2023 with high quality content from us at cheap price

    Nmims Solved Assignment

    ReplyDelete
  8. Nice Blog! Explore Test Evolve's Pinterest platform, where we showcase trending automation testing tools. Stay updated with the latest in test automation technology and elevate your testing game.

    ReplyDelete