Write the output of the following C program : main () NO — int a,b,c; @=17+23 % 7/6; b=17%23- 7-6; c=(2*b)/(14% 5); printf ("%d %d, a, 6);
Other Or UnclassifiedSource quality review required
Anna University
| University | Anna University |
|---|---|
| Degree | Common to all Subjects |
| Department | Common to all Subjects |
| Regulation | Regulation 2012 |
| Semester | 1 |
| Subject Code | GE8151 |
| Subject Name | COMPUTING TECHNIQUES |
| Exam Session | November / December 2012 |
| Duration | 3 Hours |
| Maximum Marks | 100 |
Access the previous year question paper for your examination preparation.
View / Download PDFBrowse other previous year question papers for this subject.
View All Subject Question PapersAutomatically extracted historical question data. Academic accuracy and examination rules require verification.
| Part | Required answers | Marks per answer | Section total |
|---|---|---|---|
| A | 10 | 2 | 20 |
| B | 5 | 16 | 80 |
Proportional to section marks. This estimate uses the full exam duration without a separate reading or revision reserve.
Detected alternatives only. Confirm the actual choice rules in the original question paper.
Write the output of the following C program : main () NO — int a,b,c; @=17+23 % 7/6; b=17%23- 7-6; c=(2*b)/(14% 5); printf ("%d %d, a, 6);
Other Or UnclassifiedSource quality review required
Combine the following 3 statements into a single statement : பண தனா “1-3 X=X+Z;
Other Or UnclassifiedSource quality review required
Why the index of array starts from 0 instead of 1?
Other Or UnclassifiedSource quality review required
Correct error, if any in the following statements : ii) Write necessary statements for the following : char city[15}J="Chennai”, district{15)]; district = city;
Other Or UnclassifiedSource quality review required
What is the output of the following printf statement ? char name[25]="Anna university”; printf(‘\n %s”, &name[5]);
DefinitionSource quality review required
Write any two advantages of “function”.
Other Or UnclassifiedWhat is macro ?
DefinitionName any two storage classes.
Short Descriptioni) What are the major components of a general purpose computer? Explain with neat block diagram. (10) ii) Draw a flow chart to find the roots of a quadratic equation . (6)
Other Or UnclassifiedSource quality review required
a) i) What are the basic data types in C ? For each, specify number of bytes allocated and the compatible operators, with example (8) ii) Explain the usage of “switch-case” statement with example (8)
Other Or UnclassifiedSource quality review required
b) i) Write a C program (6 search and delete a number from the given array. Show the array after deletion, otherwise display, "Not Found”. (e.g). Delete 4 from array {10, 3, 8, 11, 4, 9, 6} results in {10, 3, 8, 11, 9, 6}. (8) (24244 = 8) (1) If ais greater than b, set x equal to -15.2, but if a is less than or equal to 5, set x equal to 73.8 (Il) If ilies between 7 & 16 inclusive and if at the same time 7 also lies between 5 & 14 inclusive, set k equal to i = /; otherwise k equal to i-j (ill) T6 display 1, -4, 9, -16, 25, ... -100 _ atteritlade
Other Or UnclassifiedSource quality review required
a) i) Write any four string functions and explain its usage with example. (8) ii) What is the limitation of getting sting input using scanf(“%s") ? Write any two ways to overcome it. (8)
Other Or UnclassifiedSource quality review required
b) i} How values are stored in two dimensional arrays? Write a C program to find the transpose of a matrix for the given size. (8) ii) Write a C program to store non-zero integer values into a two dimensional square matrix of given size n. Replace the right diagonal values with ‘0’ and display original and modified matrix. (8) E.g. The sample input values for the size 4 is given below : (input) 1234 (output) 1230 3215 3205 8312 8012 6438 0438
Other Or UnclassifiedSource quality review required
a) i) Write a function that returns the maximum of two integer _ values. Using this function, write a main program in C to find the maximum of n given values. ; (8) ii) What is the use of malloc() function ? Write its usage and explain with example. ் (8)
Other Or UnclassifiedSource quality review required
b) i) How pointers are used with arrays ? Explain separately for integer and character arrays. (8) ii) What is the difference between increment with “++” for pointer and other variables. Explain with example. (8)
Other Or UnclassifiedSource quality review required
a) i) What is structure variable ? Why it is required ?. Describe the syntax of defining structure and its usage with example. Compare structure variable with “union” variable by suitable illustration. (10) it) Write short note on pre-processor directives. (6)
Other Or UnclassifiedSource quality review required
b) i) Write a macro definitions for the following : (8) - define “pi” to represent the value “3.14” - define a macro AREA, to calculate area of a circle using [அ] 2n pi” above and the radius ras “pi x r*”. ii) Define a structure date, with day, month and year as its members. Declare the tags, “dob” and “cdate” to store date of birth and current date. Write a program to find the approximate age using above declarations. (8) நங்க்ள்ல்ள்ல்
Other Or UnclassifiedSource quality review required
Historical analysis based on extracted question papers. Topic classifications, marks and planning estimates are provisional.