#include void main() { float x = 1.66, y = 1.75; printf(%f%f,ceil(x), floor(y)); }

Slides:



Advertisements
Similar presentations
Topic Reviews For Unit ET156 – Introduction to C Programming Topic Reviews For Unit
Advertisements

$100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300.
$100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200.
$100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300.
$100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300 $400 $500.
AP Computer Science Anthony Keen. Computer 101 What happens when you turn a computer on? –BIOS tries to start a system loader –A system loader tries to.
$100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300.
Hosted by Type your name here Choice1Choice 2Choice 3Choice
$100 $400 $300$200$400 $200$100$100$400 $200$200$500 $500$300 $200$500 $100$300$100$300 $500$300$400$400$500.
$100 $400 $300$200$400 $200$100$100$400 $200$200$500 $500$300 $200$500 $100$300$100$300 $500$300$400$400$500.
Etter/Ingber Arrays and Matrices. Etter/Ingber One-Dimensional Arrays 4 An array is an indexed data structure 4 All variables stored in an array are of.
Jeopardy General Compare & Order AdditionSubtraction Vocabulary Q $100 Q $200 Q $300 Q $400 Q $500 Q $100 Q $200 Q $300 Q $400 Q $500 Final Jeopardy.
$100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200.
Category 1 Category 2 Category 3 Category 4 Category.
Dont Forget... Contestants …Always phrase your answers in the form of a question!
Category Category Category Category Category.
Mr. Smith Cat. 1Cat. 2Cat. 3Cat
Outcome and Theme Comprehension Strategies
$100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300.
$100 $200 $300 $400 $100 $200 $300 $400 $100 $200 $300 $400 $100 $200 $300 $400 $100 $200 $300 $400.
Chapter 7: Arrays In this chapter, you will learn about
Numerical Recipes The Art of Scientific Computing (with some applications in computational physics)
CSEB324 Data Structures & Algorithms
Monday, Jan 20, 2002Kate Gregory with material from Deitel and Deitel Week 3 Questions from Last Week Hand in Lab 1 Arrays Pointers Strings Lab 2.
Introduction to C Systems Programming Concepts. Introduction to C A simple C Program A simple C Program –Variable Declarations –printf ( ) Compiling and.
Chapter 8: Arrays.
SEE C GO Provisional Title. Syntax Types int, float, double, char, void Identifiers foo Operators + - * / ^ Delimiters ; {} () “” ‘’ Keywords return,
1 Chapter Eleven Arrays. 2 A Motivating Example main( ) { int n0, n1, n2, n3, n4; scanf(“%d”, &n0); scanf(“%d”, &n1); scanf(“%d”, &n2); scanf(“%d”, &n3);
BNF <digit> ::= 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
$100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300.
Category Heading Category Heading Category Heading.
$100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300.
And c++?. What will we do? C vs JAVA Dev-C++ tutorial and your first program C++ structure Reading input/output Flow Control (if, for, while) array function.
IT 325 OPERATING SYSTEM C programming language. Why use C instead of Java Intermediate-level language:  Low-level features like bit operations  High-level.
Blank Jeopardy. Category #1 Category #2 Category #3 Category #4 Category #
$100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300.
Team 4Team 5 Team 6 Team 1Team 2Team 3 Round 2 Final Jeopardy Round 1.
Dynamic Memory Allocation in C.  What is Memory What is Memory  Memory Allocation in C Memory Allocation in C  Difference b\w static memory allocation.
Pointers. 2 A pointer is a variable that points to or references a memory location in which data is stored. Each memory cell in the computer has an address.
200 pt 300 pt 400 pt 500 pt 100 pt 200 pt 300 pt 400 pt 500 pt 100 pt 200 pt 300 pt 400 pt 500 pt 100 pt 200 pt 300 pt 400 pt 500 pt 100 pt 200 pt 300.
01. Consider the following code segment. int x = int n = 0; if (x < 500) { if (x > 750) n = 100; else n = 200; } else { if (x < 300) n = 300; else n =
Programming and Data Structure
Introduction to Programming Lecture 39. Copy Constructor.
Making Choices in C if/else statement logical operators break and continue statements switch statement the conditional operator.
What is a pointer? First of all, it is a variable, just like other variables you studied So it has type, storage etc. Difference: it can only store the.
Array_strcpy void array_strcpy(char dest[], char src[]) { int i = 0; while (src[i] != '\0') { dest[i] = src[i]; i++; } dest[i] = '\0'; }
Sort the given string, without using string handling functions.
By Senem Kumova Metin 1 POINTERS + ARRAYS + STRINGS REVIEW.
Kernighan/Ritchie: Kelley/Pohl:
Basic C Programming Data Types and Arithmetic Operations 01/30/15.
Lecture No: 16. The scanf() function In C programming language, the scanf() function is used to read information from standard input device (keyboard).
POINTERS. 1.a) POINTER EXPRESSIONS Pointer variables can be used in expression If p1 and p2 are properly declared and initialized pointers then following.
C Tokens Identifiers Keywords Constants Operators Special symbols.
1 ร. ศ. ดร. สุเทพ มาดารัศมี Understanding Pointers in C Chapter 10 of Programming with C Book.
Copyright ©: Nahrstedt, Angrave, Abdelzaher1 C Basics Tarek Abdelzaher and Vikram Adve.
Pointers and Arrays An array's name is a constant whose value is the address of the array's first element. For this reason, the value of an array's name.
Department of Electronic & Electrical Engineering IO reading and writing variables scanf printf format strings "%d %c %f"
Review (before the 1 st test): while (conditions) { statements; } while loop: if/else if/else statements: if (conditions) { statements; } else if (different.
LOOPING IN C. What would be the output of the following program main( ) { int j ; while ( j
© Copyright 1992–2004 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Arrays Outline 6.1Introduction 6.2Arrays 6.3Declaring.
Basic Concepts:- Invalid use of Address Operator &75 &(‘a’) &(a+b)
Array in C# Array in C# RIHS Arshad Khan
Decisions Chapter 4.
C programming language
פרטים נוספים בסילבוס של הקורס
פרטים נוספים בסילבוס של הקורס
Programming Language C Language.
Arrays.
C Data Types and Variable
Range check 範圍檢查: int age; int score; int month; 1-12
Presentation transcript:

#include void main() { float x = 1.66, y = 1.75; printf(%f%f,ceil(x), floor(y)); }

#include void main() { int x = 10, y =20; if(!(!x) && x) printf(x = %d,x); else printf(y = %d,y); }

#include void main() { int a = 500, b=100,c; if(!a >= 400) b = 300; c = 200; printf(b = %d c = %d,b,c); }

#include void main() { int a = 10,b; a >= 5 ?b=100 :b=200; printf(%d,b); }

Which of the following cannot be checked in a switch - case statement? a. Character b. Integer c. Float

Which of the following are unary operators in C? a. ! b. sizeof c. ~ d. && e. =

#include void main() { static int a[20]; int i = 0; a[i] = i++; printf(%d%d%d,a[0],a[1],i); }

#include void main() { int I = 3; i = i++; printf(%d,i); }

#include void main() { int x = 4,y,z; y = --x; z = x--; printf(%d%d%d,x,y,z); }

#include void main() { int x = 55; printf(%d%d%d,x =10); }

#include #define SQR(x) (x * x) void main() { int a, b =3; a = SQR(b+2); printf(%d,a); }

#include void main() { int arr[1] = {10}; printf(%d, 0[arr]); }

If the array begins at address 1200 in memory, what will be the output of the program? #include void main() { int a[] = {1,2,3,4,5}; printf(%u%u%u,arr,&arr[0],&arr); }

#include void main() { float a[] = {1.2,2.4,3.5,4.5}; printf(%d, sizeof(a) / sizeof(a[0])); }

#include void main() { printf(%c, abcdefgh[4]); }

#include void main() { printf(5 + Fascimile\n) } o/p : mile

#include void main() { int I; printf(%d, scanf(%d,&i)); }

#include void main() { char p[] = %d\n; p[1] = c; printf(p,65); }

#include void main() { char str[10] = Angel; str[6] = d; printf(%s,str); } o/p : Angel

#include void main() { char str[] = Sales\0man\0; printf(%s,str); } o/p : Sales