July 13th, 2014 04:36 PM | |
Harsh Pandit | Re: Anna University MCA solved question papers Here I am giving you solved question paper for MCA course offered by Anna university in a PDF file attached with it so you can get it easily. 1. Define the term Algorithm An algorithm consists of a set of explicit and unambiguous finite steps which when carried out for a given set of initial conditions produce the corresponding output and terminate in a finite state. 2. What is meant by Program verification Program verification is to ensure the correctness of a program. Verification is set of activities that ensure that the software correctly implements a specific function. Testing is a technique used to verify the program correctness. 3. Write an algorithm to swap two integer values without using temporary variable Step 1: Start the process Step 2: Get two integer values namely a, b as input. Step 3: Swap two numbers using the following logic: a = a + b; b = a - b; a = a - b; Step 4: Display the swapped contents Step 5: Terminate the process 4. What will be the output of the program? Void main() { int ch = 65; printf(ā%d %cā,ch+1,ch); } OUTPUT: 66 A Explanation: ch is declared as int that is equal to 65.so in printf statement ch+1 is evaluated as 65+1=66 and %c represents character so ASCII equivalent of 65 is A. 5. Write a single line conditional statement for the following: 10 if x<0 y = 0 if x=0 20 if x>0 9. How do you allocate memory dynamically? Two ways to dynamically allocate memory: ā¢ Using pointers ā¢ Using Dynamic memory allocation functions: o malloc() is used to allocate memory space in bytes o calloc() is sued to allocate multiple blocks of memory dynamically during the execution (run-time) of the program o realloc() to increase the size of a block of dynamically allocated memory. Anna University MCA solved question papers |
July 2nd, 2014 05:12 PM | |
Unregistered | Anna University MCA solved question papers Can you give me solved question paper for MCA course offered by Anna university in a PDF file format ? |