Purchase Solution

Declarations in C Programming

Not what you're looking for?

Ask Custom Question

****This is "C" Programming****

I selected "b" but I've always seem to get lost doing Boolean.

Assuming the following declarations:

int A=1, B=2, C=3, D=4;

What is the value of the following (Boolean) expression?

C == D || B > A && C

a. 0
b. 1
c. There is a syntax error in the expression.
d. There is no error, but the value cannot be determined from the information given.

My breakdown is as follows:

C == D || B > A && C
3 == 4 || 2 > 1 && 3
(3 == 4) || (2 > (1 && 3))
0 || (2 > (1))
0 || 1
answer is true or 1

Purchase this Solution

Solution Summary

A declaration in C programming is provided.

Solution Preview

If you look into C operator precedence [1] you will find that

the greater than operator >
has a higher precedence, next comes relational equality ==, next ...

Purchase this Solution


Free BrainMass Quizzes
Java loops

This quiz checks your knowledge of for and while loops in Java. For and while loops are essential building blocks for all Java programs. Having a solid understanding of these constructs is critical for success in programming Java.

Inserting and deleting in a linked list

This quiz tests your understanding of how to insert and delete elements in a linked list. Understanding of the use of linked lists, and the related performance aspects, is an important fundamental skill of computer science data structures.

Word 2010: Table of Contents

Ever wondered where a Table of Contents in a Word document comes from? Maybe you need a refresher on the topic? This quiz will remind you of the keywords and options used when working with a T.O.C. in Word 2010.

Basic Networking Questions

This quiz consists of some basic networking questions.

Excel Introductory Quiz

This quiz tests your knowledge of basics of MS-Excel.