Huawei Placement Paper Questions

Size: px
Start display at page:

Download "Huawei Placement Paper Questions"

Transcription

1 1.Following some pattern, understand the table and find the answer? JANUARY 20 APRIL 10 MAY 5 NOVEMBER 15 JULY? 2. Find the missing number: ?? 3. If it was two hours later, it would be half an hour as long until midnight as it will be if it were an hour later. What is the time now? 4. In a city, 80% speaks English, 70% speaks Hindi and 10% do not speak both. It was found that 162 people talk both. How many are there in the city?

2 5. Find the missing number: X Which is not 'lean year': Find the missing number: J,?, M,?, M, J,?, A, S, O, N,? 8. There are 27 pearls in a bag. One among them is less in weight. You have been given 2 pan weight machine. In how many trials, you will be able to find the defected one? Direct distance between A & B is 200. Direct distance between B & C is 200. Direct distance between C & A? 10. There are 30 socks in a bag. 30% is in blue color. What is the probability to take two blue socks?

3 11. In a ground, there are two poles in 7 ft & 12 ft respectively. They are 12 ft apart from each other. What is the distance between the edges of two poles? 12. You need to print an document of the area 216 sq cm. Condition is 3 cm margin is to be left at both top & bottom and 2 cm at the sides. What 'd be the optimized size of your paper? 13. In a party, every man has his dog with him. There are 22 heads and 72 legs all together. How many men & dogs are there? 14. Ram writes a number between 1 to Raja wants to know the number, knowing Ram can answer only yes & no and always speaks truth. What will be the minimum number of questions Raja finds the answer. a. 999 b.10 c.500 d.none 15. How many ways a section of four letter word can be made in complete alphabet? 16. Find the missing number: 0, 0.577, 1, 1.732,?

4 a b.2 c d.none (101 digits) is divided by 625. What is the answer? 18. Synonym for ZENITH: ridge trough nadir crecent 19. June 30, 2004 is wednesday. What is June 30, 1974? 20. Two different types of tea are mixed, at 6 Kg of type 1 and 4 Kg of type 2. One Kg of type 1 is Rs. 6 and that of type 2 is Rs. 7. The seller get 10% profit, by this action. Find at what price, he 'd have sold the mixture/kg? 21. All the students of class are told to sit in circle shape. Here the boy at the 6 th position is exactly opposite to 16 th boy. Total number of boys in the class? 22. The average mark of 10 students is 80%. Later it was found that for one student, instead of 60%, the recorded 90%, by mistake. Now the corrected new percentage?

5 Ans: Old % is 80 for 10 ppl. So the total: 800. Difference in correction : 30. So the total : 770 for 10 ppl. (i.e) 770/10= 77%. (New %) 23 A can do a piece of work in 7 days of 9 hours each and B can do it in 6 days of 7 bours each. How long will they take to do it, working together 8 hours a day? Sol. 3 days 24. A and B can do a piece of work in 18 days; Band C can do it in 24 days A and C can do it in 36 days. In how many days will A, Band C finish it together and separately? Sol., A, Band C together can finish the work in 16 days. A alone can finish the work in 48 days. B alone can finish the work in 144/5=28 4/5 days

6 C alone can finish the work in 144 days. 25. A is twice as good a workman as B and together they finish a piece in 18 days. In how many days will A alone finish the work? Sol. 27 days. 26. A can do a certain job in 12 days. B is 60% more efficient than A. How many days does B alone take to do the same job? Sol. 7 1/2 days. 27. A can do a piece of work in 80 days. He works at it for 10 days B alone finishes the remaining work in 42 days. In how much time will A and B working together, finish the work? Sol. 30 days.

7 28. A and B undertake to do a piece of work for Rs A alone can do it in 6 days while B alone can do it in 8 days. With the help of C, they finish it in 3 days.!find the share of each. Sol : Rs A and B working separately can do a piece of work in 9 and 12 days respectively, If they work for a day alternately, A beginning, in how many days, the work will be completed? Sol : 10 1/4days men can complete a work in 16 days. Six days after they started working, 30 more men joined them. How many days will they now take to complete the remaining work? C programming: [What will be the output???]

8 1. void checka() { int a=2; if(a=3!=3) printf(" 3 "); else printf(" 2 "); return; 2. main() { char P[]={"Hello World";

9 printf(" %s ",p); main(); 3. UINT i,j; i = j = 0; i = ( i++ > ++j )? i++ : i--; 4. # define D 10 # define Y D+10 # define D 30 main(int argc, char *arc[])

10 { printf(" %d ",D); 5. # define TRUE 0 main() { int i=0; while(true) { printf(" %d ",i);

11 i++; printf(" %d ",i); 6. UCHAR j; for(j=0;j<2000;j++); Number of iterations? 7. main() { int a[5]; a[0]=0;

12 a[1]=1; for(i=2 ; i<4 ; i++) a[i] = a[i-1] + a[i-2]; What are the elements of array? 8.In the following code snippet can we declare a new typedef named ptr even though struct employee has not been completely declared while using typedef? A. Yes B. No Ans-A 9.What will be the output of the program? A. 3, 4, 4, 3 B. 4, 3, 4, 3

13 C. 3, 3, 4, 4 D. 3, 4, 3, 4 Ans-B 10.Two tables emp(empid,name,deptid,sal) and dept(deptid,deptname) are there.write a query which displays empname,corresponding deptname also display those employee names who donot belong to any dept. 11.Write prefix and post fix notation for (a+b)*c-(d+e)^(f-g) 12.write program to swap 2 variables without using extra memory. 13.Find the output for the following C program fn f(x) {

14 if(x<=0) return; else f(x-1)+x; 14.Find the output for the following C program main() { intx=2,y=6,z=6; x=y=z; printf(%d",x) 15. Given the following statement

15 enum day = {jan = 1, feb=4, april, may What is the value of may? (a) 4 (b) 5 (c) 6 (d) 11 (e) None of the above 16. Find the output for the following C program main {int x,j,k; j=k=6;x=2; x=j*k;

16 printf("%d", x); 17. Find the output for the following C program fn f(x) { if(x<=0) return; else f(x-1)+x; 18. Find the output for the following C program i=20,k=0; for(j=1;j<i;j=1+4*(i/j)) {k+=j<10?4:3;

17 printf("%d", k); 19. Find the output for the following C program int i =10 main() {int i =20,n; for(n=0;n<=i;) {int i=10; i++; printf("%d", i);

18 20. Find the output for the following C program int x=5; y= x&y

HCL Sample Test Paper

HCL Sample Test Paper HCL Sample Test Paper Section A 1. Which of the following involves context switch, (a) system call (b) priviliged instruction (c) floating poitnt exception (d) all the above (e) none of the above Ans:

More information

Midterm Exam 2 Solutions, C programming

Midterm Exam 2 Solutions, C programming Midterm Exam 2 Solutions, C programming April 26, 2010 Rules: Open book, open notes, open any printed or handwritten material. No electronic devices (except a music player). If you use a music player nobody

More information

2008 Geometric Placement Paper

2008 Geometric Placement Paper 2008 Geometric Placement Paper GEOMETRIC PAPER ON 4th APRIL 2008 Paper Pattern I Test : General Intelligence II test : Technical test III test : C-language I Test Some of the questions what I have I am

More information

1. Arrange the fractions 5/8, 7/12, 13/16, 16/29 and 3/4 in ascending order of magnitude.

1. Arrange the fractions 5/8, 7/12, 13/16, 16/29 and 3/4 in ascending order of magnitude. IBM Placement Paper: 1. Arrange the fractions 5/8, 7/12, 13/16, 16/29 and 3/4 in ascending order of magnitude. Ans-16/29 < 7/12 < 5/8 < 3/4 < 13/16 2. Identify the missing number in the series. 54, 49,?,

More information

Essar Placement Paper

Essar Placement Paper Essar Placement Paper Question 1 The fourth proportional to 5, 8, 15 is: A. 18 B. 24 C. 19 D. 20 Let the fourth proportional to 5, 8, 15 be x. Then, 5 : 8 : 15 : x 5x = (8 x 15) x=(8*15)/5=24 Question

More information

COP 3223 Introduction to Programming with C - Study Union - Spring 2018

COP 3223 Introduction to Programming with C - Study Union - Spring 2018 COP 3223 Introduction to Programming with C - Study Union - Spring 2018 Chris Marsh and Matthew Villegas Contents 1 Code Tracing 2 2 Pass by Value Functions 4 3 Statically Allocated Arrays 5 3.1 One Dimensional.................................

More information

VARIABLE, OPERATOR AND EXPRESSION [SET 1]

VARIABLE, OPERATOR AND EXPRESSION [SET 1] VARIABLE, OPERATOR AND EXPRESSION Question 1 Write a program to print HELLO WORLD on screen. Write a program to display the following output using a single cout statement. Subject Marks Mathematics 90

More information

CS 1713 Introduction to Programming II

CS 1713 Introduction to Programming II CS 1713 Introduction to Programming II Spring 2014 Midterm 2 -- April 24, 2014 You have 75 min. Good luck. You can use the 2-page C reference card posted in the class web page. Name: Score:./100 Background

More information

Character Strings. String-copy Example

Character Strings. String-copy Example Character Strings No operations for string as a unit A string is just an array of char terminated by the null character \0 The null character makes it easy for programs to detect the end char s[] = "0123456789";

More information

COP 3223 Introduction to Programming with C - Study Union - Fall 2017

COP 3223 Introduction to Programming with C - Study Union - Fall 2017 COP 3223 Introduction to Programming with C - Study Union - Fall 2017 Chris Marsh and Matthew Villegas Contents 1 Code Tracing 2 2 Pass by Value Functions 4 3 Statically Allocated Arrays 5 3.1 One Dimensional.................................

More information

2. In simple interest what sum amounts of Rs.1120/- in 4 years and Rs.1200/- in 5 years?

2. In simple interest what sum amounts of Rs.1120/- in 4 years and Rs.1200/- in 5 years? ORACLE Placement Papers 1. A certain number of men can finish a piece of work in 10 days. If however there were 10 men less it will take 10 days more for the work to be finished. How many men were there

More information

CS 1713 Introduction to Programming II

CS 1713 Introduction to Programming II CS 1713 Introduction to Programming II Spring 2014 Midterm 2 -- April 24, 2014 You have 75 min. Good luck. You can use the 2-page C reference card posted in the class web page. Name: Score:./100 Background

More information

Huawei Test 3. 1 A card is drawn from a pack of 52 cards. The probability of getting a queen of club or a king of heart is:

Huawei Test 3. 1 A card is drawn from a pack of 52 cards. The probability of getting a queen of club or a king of heart is: Huawei Test 3 1 A card is drawn from a pack of 52 cards. The probability of getting a queen of club or a king of heart is: ( )1 /13 ( )2 /13 ( )1 /26 ( )1 /52 Here, n(s) = 52. Let E = event of getting

More information

CS 223: Data Structures and Programming Techniques. Exam 2

CS 223: Data Structures and Programming Techniques. Exam 2 CS 223: Data Structures and Programming Techniques. Exam 2 Instructor: Jim Aspnes Work alone. Do not use any notes or books. You have approximately 75 minutes to complete this exam. Please write your answers

More information

Department of Computer Science Admission Test for PhD Program. Part I Time : 30 min Max Marks: 15

Department of Computer Science Admission Test for PhD Program. Part I Time : 30 min Max Marks: 15 Department of Computer Science Admission Test for PhD Program Part I Time : 30 min Max Marks: 15 Each Q carries 1 marks. ¼ mark will be deducted for every wrong answer. Part II of only those candidates

More information

Midterm Exam 2 Solutions C Programming Dr. Beeson, Spring 2009

Midterm Exam 2 Solutions C Programming Dr. Beeson, Spring 2009 Midterm Exam 2 Solutions C Programming Dr. Beeson, Spring 2009 April 16, 2009 Instructions: Please write your answers on the printed exam. Do not turn in any extra pages. No interactive electronic devices

More information

Procedures, Parameters, Values and Variables. Steven R. Bagley

Procedures, Parameters, Values and Variables. Steven R. Bagley Procedures, Parameters, Values and Variables Steven R. Bagley Recap A Program is a sequence of statements (instructions) Statements executed one-by-one in order Unless it is changed by the programmer e.g.

More information

Arrays. An array is a collection of several elements of the same type. An array variable is declared as array name[size]

Arrays. An array is a collection of several elements of the same type. An array variable is declared as array name[size] (November 10, 2009 2.1 ) Arrays An array is a collection of several elements of the same type. An array variable is declared as type array name[size] I The elements are numbered as 0, 1, 2... size-1 I

More information

Recursion Enums. Basics of Programming 1. Department of Networked Systems and Services G. Horváth, A.B. Nagy, Z. Zsóka, P. Fiala, A.

Recursion Enums. Basics of Programming 1. Department of Networked Systems and Services G. Horváth, A.B. Nagy, Z. Zsóka, P. Fiala, A. Recursion The enumerated type Recursion Enums Basics of Programming 1 Department of Networked Systems and Services G. Horváth, A.B. Nagy, Z. Zsóka, P. Fiala, A. Vitéz 31 October, 2018 based on slides by

More information

CGS 3460 Summer 07 Midterm Exam

CGS 3460 Summer 07 Midterm Exam Short Answer 3 Points Each 1. What would the unix command gcc somefile.c -o someotherfile.exe do? 2. Name two basic data types in C. 3. A pointer data type holds what piece of information? 4. This key

More information

COP 3223 Introduction to Programming with C - Study Union - Fall 2017

COP 3223 Introduction to Programming with C - Study Union - Fall 2017 COP 3223 Introduction to Programming with C - Study Union - Fall 2017 Chris Marsh and Matthew Villegas Contents 1 Code Tracing 2 2 Pass by Value Functions 4 3 Statically Allocated Arrays 5 3.1 One Dimensional.................................

More information

The Oracle Interview consists of two parts. One for Written test Interview and Another one for HR interview.

The Oracle Interview consists of two parts. One for Written test Interview and Another one for HR interview. Oracle Interview Procedure The Oracle Interview consists of two parts. One for Written test Interview and Another one for HR interview. Written test paper consists of 30 questions. There is No Negative

More information

Computer Science 330 Assignment

Computer Science 330 Assignment Computer Science 330 Assignment Note: All questions are compulsory. The marks for each question are given at the same place. Max. Marks: 20 (ii) Write your name, enrolment number, AI name and subject etc.

More information

Huawei Test 2. 1 Two dice are thrown simultaneously. What is the probability of getting two numbers whose product is even?

Huawei Test 2. 1 Two dice are thrown simultaneously. What is the probability of getting two numbers whose product is even? Huawei Test 2 1 Two dice are thrown simultaneously. What is the probability of getting two numbers whose product is even? ( )1/ 2 ( )3/4 ( )3/8 ( )5/16 Explanation: In a simultaneous throw of two dice,

More information

Darshan Institute of Engineering & Technology for Diploma Studies Unit 5

Darshan Institute of Engineering & Technology for Diploma Studies Unit 5 1 What is structure? How to declare a Structure? Explain with Example Structure is a collection of logically related data items of different data types grouped together under a single name. Structure is

More information

Q1: Multiple choice / 20 Q2: Arrays / 40 Q3: Functions / 40 TOTAL SCORE / 100 EXTRA CREDIT / 10

Q1: Multiple choice / 20 Q2: Arrays / 40 Q3: Functions / 40 TOTAL SCORE / 100 EXTRA CREDIT / 10 EECE.2160: ECE Application Programming Spring 2017 Exam 2 March 29, 2017 Name: Section (circle 1): 201 (Dr. Li, MWF 8-8:50) 202 (Dr. Geiger, MWF 12-12:50) For this exam, you may use only one 8.5 x 11 double-sided

More information

Renault Nissan Placement Paper Part-1

Renault Nissan Placement Paper Part-1 Renault and Nissan interview process Selection process consisted of three rounds 1.Written test 2.Technical interview 3.HR interview Written test had 50 aptitude questions to be solved in 1 hour. Questions

More information

Slide Set 2. for ENCM 335 in Fall Steve Norman, PhD, PEng

Slide Set 2. for ENCM 335 in Fall Steve Norman, PhD, PEng Slide Set 2 for ENCM 335 in Fall 2018 Steve Norman, PhD, PEng Electrical & Computer Engineering Schulich School of Engineering University of Calgary September 2018 ENCM 335 Fall 2018 Slide Set 2 slide

More information

Variables Data types Variable I/O. C introduction. Variables. Variables 1 / 14

Variables Data types Variable I/O. C introduction. Variables. Variables 1 / 14 C introduction Variables Variables 1 / 14 Contents Variables Data types Variable I/O Variables 2 / 14 Usage Declaration: t y p e i d e n t i f i e r ; Assignment: i d e n t i f i e r = v a l u e ; Definition

More information

DEPARTMENT OF MATHS, MJ COLLEGE

DEPARTMENT OF MATHS, MJ COLLEGE T. Y. B.Sc. Mathematics MTH- 356 (A) : Programming in C Unit 1 : Basic Concepts Syllabus : Introduction, Character set, C token, Keywords, Constants, Variables, Data types, Symbolic constants, Over flow,

More information

typedef int Array[10]; String name; Array ages;

typedef int Array[10]; String name; Array ages; Morteza Noferesti The C language provides a facility called typedef for creating synonyms for previously defined data type names. For example, the declaration: typedef int Length; Length a, b, len ; Length

More information

Kurt Schmidt. October 30, 2018

Kurt Schmidt. October 30, 2018 to Structs Dept. of Computer Science, Drexel University October 30, 2018 Array Objectives to Structs Intended audience: Student who has working knowledge of Python To gain some experience with a statically-typed

More information

Flowchart, Types, and Values

Flowchart, Types, and Values Flowchart, Types, and Values Course Number CLO : 1 Week : 1-3 : FEH1H3 CLO#1 Student have the knowledge to create algorithm and iteration Know the fundamental of computer system Understand the components

More information

Latest R Systems Placement Test Questions

Latest R Systems Placement Test Questions APTITUDE: Q1. At a special sale, 5 tickets can be purchased for the price of 3 tickets. If 5 tickets are purchased at the sale, the amount saved will be what percent of the original price of the 5 tickets?

More information

Subject: PROBLEM SOLVING THROUGH C Time: 3 Hours Max. Marks: 100

Subject: PROBLEM SOLVING THROUGH C Time: 3 Hours Max. Marks: 100 Code: DC-05 Subject: PROBLEM SOLVING THROUGH C Time: 3 Hours Max. Marks: 100 NOTE: There are 11 Questions in all. Question 1 is compulsory and carries 16 marks. Answer to Q. 1. must be written in the space

More information

Introduction. Structures, Unions, Bit Manipulations, and Enumerations. Structure. Structure Definitions

Introduction. Structures, Unions, Bit Manipulations, and Enumerations. Structure. Structure Definitions Introduction Structures, Unions, Bit Manipulations, and Enumerations In C, we can create our own data types If programmers do a good job of this, the end user does not even have to know what is in the

More information

York University Faculty Science and Engineering Fall 2008

York University Faculty Science and Engineering Fall 2008 York University Faculty Science and Engineering Fall 2008 CSE2031 Final Software Tools Friday, Feb..26 th, 2008 Last Name 08:30 10:30am First name ID Instructions to students: Answer all questions. Marks

More information

MYcsvtu Notes LECTURE 34. POINTERS

MYcsvtu Notes LECTURE 34.  POINTERS LECTURE 34 POINTERS Pointer Variable Declarations and Initialization Pointer variables Contain memory addresses as their values Normal variables contain a specific value (direct reference) Pointers contain

More information

Mechatronics and Microcontrollers. Szilárd Aradi PhD Refresh of C

Mechatronics and Microcontrollers. Szilárd Aradi PhD Refresh of C Mechatronics and Microcontrollers Szilárd Aradi PhD Refresh of C About the C programming language The C programming language is developed by Dennis M Ritchie in the beginning of the 70s One of the most

More information

CS 0449 Sample Midterm

CS 0449 Sample Midterm Name: CS 0449 Sample Midterm Multiple Choice 1.) Given char *a = Hello ; char *b = World;, which of the following would result in an error? A) strlen(a) B) strcpy(a, b) C) strcmp(a, b) D) strstr(a, b)

More information

Warmup January 9th, What is the value of the following C expression? 8*9 % 10/ 2

Warmup January 9th, What is the value of the following C expression? 8*9 % 10/ 2 Warmup January 9th, 2018 What is the value of the following C expression? 8*9 % 10/ 2 Warmup January 11th, 2018 What is the value of the following C expression? ( -42 3!= 3) && ( -3 < -2 < -1) Warmup January

More information

CSE 333 Midterm Exam 7/29/13

CSE 333 Midterm Exam 7/29/13 Name There are 5 questions worth a total of 100 points. Please budget your time so you get to all of the questions. Keep your answers brief and to the point. The exam is closed book, closed notes, closed

More information

Operators And Expressions

Operators And Expressions Operators And Expressions Operators Arithmetic Operators Relational and Logical Operators Special Operators Arithmetic Operators Operator Action Subtraction, also unary minus + Addition * Multiplication

More information

Compiling and Running a C Program in Unix

Compiling and Running a C Program in Unix CPSC 211 Data Structures & Implementations (c) Texas A&M University [ 95 ] Compiling and Running a C Program in Unix Simple scenario in which your program is in a single file: Suppose you want to name

More information

PPT-2011 Test No 11 FM:- 45. Aptitude

PPT-2011 Test No 11 FM:- 45. Aptitude PPT-2011 Test No 11 FM:- 45 Aptitude 1. If 13 = 13w/(1-w),then (2w) 2 =? A.1/4 B.1/2 C.1 D.2 2. If a and b are positive integers and (a-b)/3.5 = 4/7, then A. b < a B. b > a C. b = a D. b >= a 3. If 9x-3y=12

More information

Approximately a Final Exam CPSC 206

Approximately a Final Exam CPSC 206 Approximately a Final Exam CPSC 206 Sometime in History based on Kelley & Pohl Last name, First Name Last 4 digits of ID Write your section number: All parts of this exam are required unless plainly and

More information

Some Technical and Aptitude Questions. Written Test. No of Questions :70 (40 Tech+30Apti) Time : 60 Minutes. void main( ) int i; i=(2,3);

Some Technical and Aptitude Questions. Written Test. No of Questions :70 (40 Tech+30Apti) Time : 60 Minutes. void main( ) int i; i=(2,3); Some Technical and Aptitude Questions Written Test No of Questions :70 (40 Tech+30Apti) Time : 60 Minutes 1) void main( ) { int i; i=(2,3); printf( %d,i); } a) 2 b) 3 c) garbage value. d)none of these.

More information

Online Judge and C. Roy Chan. January 12, Outline Information Online Judge Introduction to C. CSC2100B Data Structures Tutorial 1

Online Judge and C. Roy Chan. January 12, Outline Information Online Judge Introduction to C. CSC2100B Data Structures Tutorial 1 Roy Chan CSC2100B Data Structures Tutorial 1 January 12, 2009 1 / 38 1 Information Your TA team Course Information Assignment 2 Online Judge Writing Your Assignment Program Submitting Your Program Online

More information

Sample Paper on GSAT with Solutions: -

Sample Paper on GSAT with Solutions: - Sample Paper on GSAT with Solutions: - 1. If it costs x dollars for making certain item if quantity is 1000 and if quantity increase then the item is made using y dollars. If z number of items are made

More information

HCL Aptitude Test a=2, b=3, c=6 Find the value of c/(a+b)-(a+b)/c Ans. 11/30

HCL Aptitude Test a=2, b=3, c=6 Find the value of c/(a+b)-(a+b)/c Ans. 11/30 HCL Aptitude Test 3 1. a=2, b=3, c=6 Find the value of c/(a+b)-(a+b)/c Ans. 11/30 2. What does the hexa number E78 in radix 7. (a) 12455 (b) 14153 (c) 14256 (d) 13541 (e) 131112 Ans. (d) 3. What does the

More information

OBJECT ORIENTED PROGRAMMING USING C++

OBJECT ORIENTED PROGRAMMING USING C++ OBJECT ORIENTED PROGRAMMING USING C++ Chapter 10 - Structures, Unions, Bit Manipulations, and Enumerations Outline 10.1 Introduction 10.2 Structure Definitions 10.3 Initializing Structures 10.4 Accessing

More information

AMCAT Automata Coding Sample Questions And Answers

AMCAT Automata Coding Sample Questions And Answers 1) Find the syntax error in the below code without modifying the logic. #include int main() float x = 1.1; switch (x) case 1: printf( Choice is 1 ); default: printf( Invalid choice ); return

More information

14. Other Data Types. Compound Data Types: Defined data types (typedef) Unions typedef existing_type new_type_name ;

14. Other Data Types. Compound Data Types: Defined data types (typedef) Unions typedef existing_type new_type_name ; - 95 - Compound Data Types: 14 Other Data Types Defined data types (typedef) C++ allows the definition of our own types based on other existing data types We can do this using the keyword typedef, whose

More information

Introduction to C Language (M3-R )

Introduction to C Language (M3-R ) Introduction to C Language (M3-R4-01-18) 1. Each question below gives a multiple choice of answers. Choose the most appropriate one and enter in OMR answer sheet supplied with the question paper, following

More information

WIPRO Placement Paper By Students3k.com

WIPRO Placement Paper By Students3k.com WIPRO Placement Paper By Students3k.com (Aptitude and Technical) PART -1 Aptitude 15 Questions: Questions = 50 ; Time limit = 50 minutes. no negative marking. Offline (paper & pen) test Section1- English,

More information

Basic Elements of C. Staff Incharge: S.Sasirekha

Basic Elements of C. Staff Incharge: S.Sasirekha Basic Elements of C Staff Incharge: S.Sasirekha Basic Elements of C Character Set Identifiers & Keywords Constants Variables Data Types Declaration Expressions & Statements C Character Set Letters Uppercase

More information

CMSC 313 COMPUTER ORGANIZATION & ASSEMBLY LANGUAGE PROGRAMMING LECTURE 13, FALL 2012

CMSC 313 COMPUTER ORGANIZATION & ASSEMBLY LANGUAGE PROGRAMMING LECTURE 13, FALL 2012 CMSC 313 COMPUTER ORGANIZATION & ASSEMBLY LANGUAGE PROGRAMMING LECTURE 13, FALL 2012 TOPICS TODAY Project 5 Pointer Basics Pointers and Arrays Pointers and Strings POINTER BASICS Java Reference In Java,

More information

Memory. What is memory? How is memory organized? Storage for variables, data, code etc. Text (Code) Data (Constants) BSS (Global and static variables)

Memory. What is memory? How is memory organized? Storage for variables, data, code etc. Text (Code) Data (Constants) BSS (Global and static variables) Memory Allocation Memory What is memory? Storage for variables, data, code etc. How is memory organized? Text (Code) Data (Constants) BSS (Global and static variables) Text Data BSS Heap Stack (Local variables)

More information

Remember to also pactice: Homework, quizzes, class examples, slides, reading materials.

Remember to also pactice: Homework, quizzes, class examples, slides, reading materials. Exam 1 practice problems Remember to also pactice: Homework, quizzes, class examples, slides, reading materials. P1 (MC) For all the questions below (except for the True or False questions), the answer

More information

Intermediate Programming, Spring 2017*

Intermediate Programming, Spring 2017* 600.120 Intermediate Programming, Spring 2017* Misha Kazhdan *Much of the code in these examples is not commented because it would otherwise not fit on the slides. This is bad coding practice in general

More information

Arrays and Pointers (part 2) Be extra careful with pointers!

Arrays and Pointers (part 2) Be extra careful with pointers! Arrays and Pointers (part 2) EECS 2031 22 October 2017 1 Be extra careful with pointers! Common errors: l Overruns and underruns Occurs when you reference a memory beyond what you allocated. l Uninitialized

More information

2. A circle is inscribed in a square of diagonal length 12 inches. What is the area of the circle?

2. A circle is inscribed in a square of diagonal length 12 inches. What is the area of the circle? March 24, 2011 1. When a square is cut into two congruent rectangles, each has a perimeter of P feet. When the square is cut into three congruent rectangles, each has a perimeter of P 6 feet. Determine

More information

Program Organization and Comments

Program Organization and Comments C / C++ PROGRAMMING Program Organization and Comments Copyright 2013 Dan McElroy Programming Organization The layout of a program should be fairly straight forward and simple. Although it may just look

More information

Arrays and Pointers (part 2) Be extra careful with pointers!

Arrays and Pointers (part 2) Be extra careful with pointers! Arrays and Pointers (part 2) CSE 2031 Fall 2011 23 October 2011 1 Be extra careful with pointers! Common errors: Overruns and underruns Occurs when you reference a memory beyond what you allocated. Uninitialized

More information

EECE.2160: ECE Application Programming Fall 2017 Exam 3 December 16, 2017

EECE.2160: ECE Application Programming Fall 2017 Exam 3 December 16, 2017 EECE.2160: ECE Application Programming Fall 2017 Exam 3 December 16, 2017 Name: Lecture time (circle 1): 8-8:50 (Sec. 201) 12-12:50 (Sec. 203) 1-1:50 (Sec. 202) For this exam, you may use only one 8.5

More information

IV Unit Second Part STRUCTURES

IV Unit Second Part STRUCTURES STRUCTURES IV Unit Second Part Structure is a very useful derived data type supported in c that allows grouping one or more variables of different data types with a single name. The general syntax of structure

More information

Questions = 50; time limit = 50 minutes. No negative marking. Offline (paper & pen) test. There was individual cut off for all the sections

Questions = 50; time limit = 50 minutes. No negative marking. Offline (paper & pen) test. There was individual cut off for all the sections Aptitude test : Questions = 50; time limit = 50 minutes. No negative marking. Offline (paper & pen) test. There was individual cut off for all the sections Section 1: English, 15 questions Direction 1-5:

More information

UNIVERSITY OF WINDSOR Fall 2007 QUIZ # 2 Solution. Examiner : Ritu Chaturvedi Dated :November 27th, Student Name: Student Number:

UNIVERSITY OF WINDSOR Fall 2007 QUIZ # 2 Solution. Examiner : Ritu Chaturvedi Dated :November 27th, Student Name: Student Number: UNIVERSITY OF WINDSOR 60-106-01 Fall 2007 QUIZ # 2 Solution Examiner : Ritu Chaturvedi Dated :November 27th, 2007. Student Name: Student Number: INSTRUCTIONS (Please Read Carefully) No calculators allowed.

More information

4 th Six Weeks Geometry PAP

4 th Six Weeks Geometry PAP Name Period Teacher MONDAY TUESDAY WEDNESDAY THURSDAY FRIDAY Jan 4 Student Holiday Teacher Workday Radicals Review HW: Wksht Radicals Review day 1 & Watch Video Pythagorean Theorem.1 Working with Pythagorean

More information

CS 223: Data Structures and Programming Techniques. Exam 2. April 19th, 2012

CS 223: Data Structures and Programming Techniques. Exam 2. April 19th, 2012 CS 223: Data Structures and Programming Techniques. Exam 2 April 19th, 2012 Instructor: Jim Aspnes Work alone. Do not use any notes or books. You have approximately 75 minutes to complete this exam. Please

More information

BCIS 3630 Dr. GUYNES SPRING 2018 TUESDAY SECTION [JAN version] GRADER COURSE WEBSITE

BCIS 3630 Dr. GUYNES SPRING 2018 TUESDAY SECTION [JAN version] GRADER   COURSE WEBSITE COURSE WEBSITE http://www.steveguynes.com/bcis3630/bcis3630/default.html Instructor: Dr. Guynes Office: BLB 312H Phone: (940) 565-3110 Office Hours: By Email Email: steve.guynes@unt.edu TEXTBOOK: Starting

More information

Principles of Programming Languages Topic: Imperative Programming II

Principles of Programming Languages Topic: Imperative Programming II Principles of Programming Languages Topic: Imperative Programming II Imperative Programming 1 Employee.c #include int find_over49(); void *malloc(); /*this makes these definitions and variables

More information

for (i=1; i<=100000; i++) { x = sqrt (y); // square root function cout << x+i << endl; }

for (i=1; i<=100000; i++) { x = sqrt (y); // square root function cout << x+i << endl; } Ex: The difference between Compiler and Interpreter The interpreter actually carries out the computations specified in the source program. In other words, the output of a compiler is a program, whereas

More information

ASSIGNMENT BOOKLET. M.Sc.(Mathematics with Applications in Computer Science) Programming and Data Structures (1 st January, 2018 December, 2018)

ASSIGNMENT BOOKLET. M.Sc.(Mathematics with Applications in Computer Science) Programming and Data Structures (1 st January, 2018 December, 2018) ASSIGNMENT BOOKLET MMT-001 M.Sc.(Mathematics with Applications in Computer Science) Programming and Data Structures (1 st January, 2018 December, 2018) School of Sciences Indira Gandhi National Open University

More information

Laboratory 2: Programming Basics and Variables. Lecture notes: 1. A quick review of hello_comment.c 2. Some useful information

Laboratory 2: Programming Basics and Variables. Lecture notes: 1. A quick review of hello_comment.c 2. Some useful information Laboratory 2: Programming Basics and Variables Lecture notes: 1. A quick review of hello_comment.c 2. Some useful information 3. Comment: a. name your program with extension.c b. use o option to specify

More information

These problems are provided to you as a guide for practice. The questions cover important concepts covered in class.

These problems are provided to you as a guide for practice. The questions cover important concepts covered in class. Midterm Written Exam Practice Midterm will cover all concepts covered up to the midterm exam. Concepts of arrays, LL s, pointers (*,**,***), malloc, calloc, realloc, function pointers, Hash tables will

More information

Binghamton University. CS-211 Fall Variable Scope

Binghamton University. CS-211 Fall Variable Scope Variable Scope 1 Scope The places in your code that can read and/or write a variable. Scope starts at the location where you declare the variable There may be holes in the scope! Scope ends at the end

More information

Mental Maths Competition Topics Included. (1) Q. No. 1 to 50 are based on basic. Calculation questions related to Addition,

Mental Maths Competition Topics Included. (1) Q. No. 1 to 50 are based on basic. Calculation questions related to Addition, Topics Included. () Q. No. to 0 are based on basic. Calculation questions related to Addition, Subtraction, Multiplication and Division, doubling and halving. () Student should know multiplication tables

More information

CS 61C: Great Ideas in Computer Architecture. Lecture 3: Pointers. Bernhard Boser & Randy Katz

CS 61C: Great Ideas in Computer Architecture. Lecture 3: Pointers. Bernhard Boser & Randy Katz CS 61C: Great Ideas in Computer Architecture Lecture 3: Pointers Bernhard Boser & Randy Katz http://inst.eecs.berkeley.edu/~cs61c Agenda Pointers in C Arrays in C This is not on the test Pointer arithmetic

More information

Data Types and Variables in C language

Data Types and Variables in C language Data Types and Variables in C language Basic structure of C programming To write a C program, we first create functions and then put them together. A C program may contain one or more sections. They are

More information

Aryan College. Fundamental of C Programming. Unit I: Q1. What will be the value of the following expression? (2017) A + 9

Aryan College. Fundamental of C Programming. Unit I: Q1. What will be the value of the following expression? (2017) A + 9 Fundamental of C Programming Unit I: Q1. What will be the value of the following expression? (2017) A + 9 Q2. Write down the C statement to calculate percentage where three subjects English, hindi, maths

More information

Chapter 2 (Dynamic variable (i.e. pointer), Static variable)

Chapter 2 (Dynamic variable (i.e. pointer), Static variable) Chapter 2 (Dynamic variable (i.e. pointer), Static variable) August_04 A2. Identify and explain the error in the program below. [4] #include int *pptr; void fun1() { int num; num=25; pptr= &num;

More information

Binghamton University. CS-211 Fall Variable Scope

Binghamton University. CS-211 Fall Variable Scope Variable Scope 1 Scope The places in your code that can read and/or write a variable. Scope starts at the location where you declare the variable There may be holes in the scope! Scope ends at the end

More information

Programming for Engineers Structures, Unions

Programming for Engineers Structures, Unions Programming for Engineers Structures, Unions ICEN 200 Spring 2017 Prof. Dola Saha 1 Structure Ø Collections of related variables under one name. Ø Variables of may be of different data types. Ø struct

More information

Question Bank (SPA SEM II)

Question Bank (SPA SEM II) Question Bank (SPA SEM II) 1. Storage classes in C (Refer notes Page No 52) 2. Difference between function declaration and function definition (This question is solved in the note book). But solution is

More information

Chapter 10 C Structures, Unions, Bit Manipulations

Chapter 10 C Structures, Unions, Bit Manipulations Chapter 10 C Structures, Unions, Bit Manipulations Skipped! Skipped! and Enumerations Skipped! Page 416 In programming languages, Arrays (Chapter 6) allows programmers to group elements of the same type

More information

provided. Use any other space for rough work. The question paper has total 8 pages. Rough Work

provided. Use any other space for rough work. The question paper has total 8 pages. Rough Work Instructions: Answer all six questions. Total marks = 60. Time = 2hrs. Write your answer only in the space provided. Use any other space for rough work. The question paper has total 8 pages. Rough Work

More information

Computer Programming. C Array is a collection of data belongings to the same data type. data_type array_name[array_size];

Computer Programming. C Array is a collection of data belongings to the same data type. data_type array_name[array_size]; Arrays An array is a collection of two or more adjacent memory cells, called array elements. Array is derived data type that is used to represent collection of data items. C Array is a collection of data

More information

CS270 Homework 5 (HW5)

CS270 Homework 5 (HW5) Name: Date: CS270 Homework 5 (HW5) Due Thursday, Nov 21 (start of class) Homework and programming assignments are to be done individually. Goals To understand C pointers and structs, and functions and

More information

Exercises with switch

Exercises with switch These are all short programs. None of these programs should exceed 30 lines. A line means any expression ending with a ;, not including header files. Some of these are as short as 10 lines. Some problems

More information

CS Programming I: Arrays

CS Programming I: Arrays CS 200 - Programming I: Arrays Marc Renault Department of Computer Sciences University of Wisconsin Madison Fall 2017 TopHat Sec 3 (PM) Join Code: 719946 TopHat Sec 4 (AM) Join Code: 891624 Array Basics

More information

Foundation Exam - Sample Problems for New Topics

Foundation Exam - Sample Problems for New Topics Foundation Exam - Sample Problems for New Topics Fall 2016 Dynamic Memory Allocation Sample Question #1 Consider the following struct to store a single Uno playing card: typedef struct char color[20];

More information

Tokens, Expressions and Control Structures

Tokens, Expressions and Control Structures 3 Tokens, Expressions and Control Structures Tokens Keywords Identifiers Data types User-defined types Derived types Symbolic constants Declaration of variables Initialization Reference variables Type

More information

C++ for Java Programmers

C++ for Java Programmers Basics all Finished! Everything we have covered so far: Lecture 5 Operators Variables Arrays Null Terminated Strings Structs Functions 1 2 45 mins of pure fun Introduction Today: Pointers Pointers Even

More information

LESSON 1. A C program is constructed as a sequence of characters. Among the characters that can be used in a program are:

LESSON 1. A C program is constructed as a sequence of characters. Among the characters that can be used in a program are: LESSON 1 FUNDAMENTALS OF C The purpose of this lesson is to explain the fundamental elements of the C programming language. C like other languages has all alphabet and rules for putting together words

More information

EE472 Final Exam SOLUTION KEY. Prof. Blake Hannaford Department of Electrical Engineering The University of Washington 9-DEC-2008

EE472 Final Exam SOLUTION KEY. Prof. Blake Hannaford Department of Electrical Engineering The University of Washington 9-DEC-2008 EE472 Final Exam SOLUTION KEY Prof. Blake Hannaford Department of Electrical Engineering The University of Washington 9-DEC-2008 Problem 1 / 15 Problem 2 / 25 Problem 3 / 25 Problem 4 / 15 Problem 5 /

More information

Low-Level C Programming. Memory map Pointers Arrays Structures

Low-Level C Programming. Memory map Pointers Arrays Structures Low-Level C Programming Memory map Pointers Arrays Structures Memory Map 0x7FFF_FFFF Binaries load at 0x20000 by default Stack start set by binary when started Stack grows downwards You will need one stack

More information

CSE 333 Midterm Exam Sample Solution 7/29/13

CSE 333 Midterm Exam Sample Solution 7/29/13 Question 1. (44 points) C hacking a question of several parts. The next several pages are questions about a linked list of 2-D points. Each point is represented by a Point struct containing the point s

More information

UNIVERSITY OF WINDSOR Winter 2007 QUIZ # 1 Solution. Examiner:Ritu Chaturvedi Dated : Feb 7 th, Student Name: Student Number:

UNIVERSITY OF WINDSOR Winter 2007 QUIZ # 1 Solution. Examiner:Ritu Chaturvedi Dated : Feb 7 th, Student Name: Student Number: UNIVERSITY OF WINDSOR 60-106-01 Winter 2007 QUIZ # 1 Solution Examiner:Ritu Chaturvedi Dated : Feb 7 th, 2007. Student Name: Student Number: INSTRUCTIONS (Please Read Carefully) No calculators allowed.

More information

TEST BDA24202 / BTI10202 COMPUTER PROGRAMMING May 2013

TEST BDA24202 / BTI10202 COMPUTER PROGRAMMING May 2013 DEPARTMENT OF MATERIAL AND ENGINEERING DESIGN FACULTY OF MECHANICAL AND MANUFACTURING ENGINEERING UNIVERSITI TUN HUSSEIN ONN MALAYSIA (UTHM), JOHOR TEST BDA24202 / BTI10202 COMPUTER PROGRAMMING May 2013

More information