Explain conditional expressions in the c language

Assignment Help C/C++ Programming
Reference no: EM13939293

What will be printed by the following code?

int a = 3;

if (a <= 5)

if (a < 2)

printf("a is less than 2n");
else
printf("a is greater than 5n");
printf("done");

Why does this occur?

What if the initial value assigned to a is 13, not 3? What happens with this code and why does this occur? What does this tell you about setting up conditional expressions in the C language?

Reference no: EM13939293

Questions Cloud

Assessment of overall project scope : Write a report on one selected topic associated with logistics processes in ERP that you think will have a major impact in the future. Sample topics would be discussed in the class as a guide for selecting a topic.
Financial reasoning and explanation of the business need : The Project Scope Statement is a document that outlines the following elements: Project Justification: Includes reasons for the project including financial reasoning and explanation of the business need. Project Description: Provides an overview o..
The pulse rates for adult women were as follows : The pulse rates for 13 adult women were as follows. Construct a 0.98 confidence interval for the mean pulse rate.
Overall strengths and weaknesses of bramstedts arguments : A paragraph recognising the overall strengths and weaknesses of Bramstedt's arguments. Please provide ONE area of strength and ONE area of weakness in the main article.
Explain conditional expressions in the c language : What if the initial value assigned to a is 13, not 3? What happens with this code and why does this occur? What does this tell you about setting up conditional expressions in the C language?
What is the genotype of all persons mentioned : In your own words, describe the process of protein synthesis, starting with the DNA, stored in the nulceus, and ending with the completed protein. Be sure to mention the terms code, codon, anticodon, mRNA, tRNA, amino acids and ribosomes in your a..
Calculate the value of t for the hypothesis test : Calculate the value of t for the hypothesis test. (Give your answer correct to two decimal places.)
Importance of distributing handouts : Q1. Explain 3 reasons why it may be hard to work in teams at times. With each reason you state, explain your strategies to try to make the experience more positive Q2. Explain the importance of distributing handouts during business presentation tha..
How can the code be corrected? : In some of the compilers the integer division returns an integer and hence cannot be stored in a float variable and to correct this you need to change the second line here with "float x=1.0/a;". Adding ".0" to 1 will make a difference.

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Asks the user for the name of an input file and translates

Write a C++ program that asks the user for the name of an input file and translates the contents of that input file using ROT13. Your  main  function should be responsible for reading the input file and coordinating calls to a value-returning functio..

  Write a program that right-justifies text

Write a program that right-justifies text. It should read and echo a sequence of left-justified lines and then print them in right-justified format.

  Write the pseudocode of the thread a and b

Suppose we have two threads A and B A and B repeatedly print out ping and pong, respectively We want to execute them in an alternating order An alternating execution would force A and B to print out in the order of ping pong ping pong ping pong Write..

  Assignment 1write a program using vectors and iterators

assignment 1write a program using vectors and iterators that allows a user to maintain a personal list of dvd titles.

  Write a function named totamt

Write a function named totamt() that uses four parameters named quarters, dimes, nickels, and pennies, which represent the number of each of these coins in a piggybank.

  Ansi-c program which allows the user to play a game

Your task is to write an ANSI-C program which allows the user to play a game. This will require I/O from both the user and from ?les.

  Display a count of the number of vowels

Write a program that accepts a word into a character array string variable. Display a count of the number of letters in the word.

  Developing a database to manage academic issues

What's A Matter University (good old Whatsamatter U) is developing a database to manage academic issues. You are asked to assist in the design of the database. Sketch the Entity-Relationship diagram for each of the following business needs. Your a..

  Parallel numeric arrays

Create and code a program that uses three parallel numeric arrays of size 6. The program searches one of the arrays and then displays the corresponding values from the other two arrays.

  Write a function to compute the magnitude f

write a function to compute the magnitude F and direction angle of a two-dimensional force F by using two components of the force fx,fy as its parameters,returning F and using the reference to pass theta value .

  Build a traffic light system - microcontroller system

Build the whole system with 3 RAG units and three puffin crossing units and build a team to work on this mini-project, be careful in selecting your team member.

  Program to generate 100,000 prime numbers

Write a POSIX C/C++ program to generate 100,000 prime numbers. Assume that the program will be run on a computer with 5 CPUs and that your goal is to have this program finish as quickly as possible.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd