PYQs

Programming for Problem Solving

25 papers · 100203, 100204, 100104, 100111

2025100203

B.Tech 2nd Semester Examination, 2025

03 Hours70 marks

Instructions

  • The marks are indicated in the right-hand margin.
  • There are NINE questions in this paper.
  • Attempt FIVE questions in all.
  • Question No. 1 is compulsory.

Q.1 Choose the correct option for the following questions (Answer any seven):

Ask AI
  1. Q1.1

    The correct syntax for an if-statement is

    a)

    if condition() { }

    b)

    if (condition) {}

    c)

    if (condition) []

    d)

    if {condition}

    Ask AI
  2. Q1.2

    C function execution always begins from

    a)

    main()

    b)

    constructor

    c)

    user-defined function

    d)

    header file

    Ask AI
  3. Q1.3

    Which storage class has the default value of a variable as zero?

    a)

    auto

    b)

    static

    c)

    extern

    d)

    register

    Ask AI
  4. Q1.4

    Relational operators always return

    a)

    Float value

    b)

    0 or 1

    c)

    Character

    d)

    None

    Ask AI
  5. Q1.5

    Which of the following is an exit-controlled loop?

    a)

    while loop

    b)

    for loop

    c)

    do-while loop

    d)

    None

    Ask AI
  6. Q1.6

    Binary search works only on

    a)

    Unsorted list

    b)

    Doubly linked list

    c)

    Sorted list

    d)

    Any list

    Ask AI
  7. Q1.7

    break keyword is used to

    a)

    Restart loop

    b)

    Terminate loop

    c)

    Skip iteration

    d)

    Exit program

    Ask AI
  8. Q1.8

    In a union, memory allocated is equal to the size of

    a)

    Sum of all members

    b)

    Smallest member

    c)

    Largest member

    d)

    Twice the size

    Ask AI
  9. Q1.9

    fopen("abc.txt","r") opens file in

    a)

    Write mode

    b)

    Append mode

    c)

    Read mode

    d)

    Read + Write mode

    Ask AI
  10. Q1.10

    Which of the following problems can be solved using recursion?

    a)

    Fibonacci

    b)

    Factorial

    c)

    GCD

    d)

    All of the above

    Ask AI

Q.2 Solve both questions :

Ask AI
  1. Q2.1

    Write an algorithm and draw the flowchart for checking whether a number is prime or not.

    Ask AI
  2. Q2.2

    Differentiate between syntax errors, logical errors, compile-time errors, and run-time errors. Provide suitable examples.

    Ask AI

Q.3 Solve both questions :

Ask AI
  1. Q3.1

    Explain function declaration, definition, and calling conventions in C. Discuss call by value and call by reference with examples.

    Ask AI
  2. Q3.2

    Differentiate between while and do-while loop construct. Write a program for generating Fibonacci series using loop.

    Ask AI

Q.4 Solve both questions :

Ask AI
  1. Q4.1

    Write the differences between if, if-else, and switch statements with examples.

    Ask AI
  2. Q4.2

    Explain the use of break, continue, and goto statements with examples.

    Ask AI

Q.5 Solve both questions :

Ask AI
  1. Q5.1

    How are arrays declared and initialized in C? What is bound checking? Why is it important in array programming?

    Ask AI
  2. Q5.2

    What is recursion? Explain how recursion works with stack memory. Write a recursive program for finding the factorial of a number.

    Ask AI

Q.6 Solve both questions :

Ask AI
  1. Q6.1

    Write a program to perform linear search in an array. Also find its complexity in Best, Average and Worst cases.

    Ask AI
  2. Q6.2

    Describe the selection sort algorithm and implement it in C language.

    Ask AI

Q.7 Solve both questions :

Ask AI
  1. Q7.1

    Explain various storage classes in C with proper examples.

    Ask AI
  2. Q7.2

    Write a program to copy the contents of one file into another and explain each step of file IO.

    Ask AI

Q.8 Solve both questions :

Ask AI
  1. Q8.1

    Explain arithmetic, relational, logical, bitwise and assignment operators in C along with their precedence rules and examples.

    Ask AI
  2. Q8.2

    What is the difference between structure and union? Explain with an example.

    Ask AI

Q.9 Write Short notes on any two of the following:

Ask AI

2025V2100203

B.Tech 2nd Semester Examination, 2025

03 Hours70 marks

Instructions

  • The marks are indicated in the right-hand margin.
  • There are NINE questions in this paper.
  • Attempt FIVE questions in all.
  • Question No. 1 is compulsory.

Q.1 Choose the correct option for the following questions (Answer any seven):

Ask AI
  1. Q1.1

    The correct syntax for an if-statement is

    a)

    if condition() { }

    b)

    if (condition) {}

    c)

    if (condition) []

    d)

    if {condition}

    Ask AI
  2. Q1.2

    C function execution always begins from

    a)

    main()

    b)

    constructor

    c)

    user-defined function

    d)

    header file

    Ask AI
  3. Q1.3

    Which storage class has the default value of a variable as zero?

    a)

    auto

    b)

    static

    c)

    extern

    d)

    register

    Ask AI
  4. Q1.4

    Relational operators always return

    a)

    Float value

    b)

    0 or 1

    c)

    Character

    d)

    None

    Ask AI
  5. Q1.5

    Which of the following is an exit-controlled loop?

    a)

    while loop

    b)

    for loop

    c)

    do-while loop

    d)

    None

    Ask AI
  6. Q1.6

    Binary search works only on

    a)

    Unsorted list

    b)

    Doubly linked list

    c)

    Sorted list

    d)

    Any list

    Ask AI
  7. Q1.7

    break keyword is used to

    a)

    Restart loop

    b)

    Terminate loop

    c)

    Skip iteration

    d)

    Exit program

    Ask AI
  8. Q1.8

    In a union, memory allocated is equal to the size of

    a)

    Sum of all members

    b)

    Smallest member

    c)

    Largest member

    d)

    Twice the size

    Ask AI
  9. Q1.9

    fopen("abc.txt","r") opens file in

    a)

    Write mode

    b)

    Append mode

    c)

    Read mode

    d)

    Read + Write mode

    Ask AI
  10. Q1.10

    Which of the following problems can be solved using recursion?

    a)

    Fibonacci

    b)

    Factorial

    c)

    GCD

    d)

    All of the above

    Ask AI

Q.2 Solve both questions :

Ask AI
  1. Q2.1

    Write an algorithm and draw the flowchart for checking whether a number is prime or not.

    Ask AI
  2. Q2.2

    Differentiate between syntax errors, logical errors, compile-time errors, and run-time errors. Provide suitable examples.

    Ask AI

Q.3 Solve both questions :

Ask AI
  1. Q3.1

    Explain function declaration, definition, and calling conventions in C. Discuss call by value and call by reference with examples.

    Ask AI
  2. Q3.2

    Differentiate between while and do-while loop construct. Write a program for generating Fibonacci series using loop.

    Ask AI

Q.4 Solve both questions :

Ask AI
  1. Q4.1

    Write the differences between if, if-else, and switch statements with examples.

    Ask AI
  2. Q4.2

    Explain the use of break, continue, and goto statements with examples.

    Ask AI

Q.5 Solve both questions :

Ask AI
  1. Q5.1

    How are arrays declared and initialized in C? What is bound checking? Why is it important in array programming?

    Ask AI
  2. Q5.2

    What is recursion? Explain how recursion works with stack memory. Write a recursive program for finding the factorial of a number.

    Ask AI

Q.6 Solve both questions :

Ask AI
  1. Q6.1

    Write a program to perform linear search in an array. Also find its complexity in Best, Average and Worst cases.

    Ask AI
  2. Q6.2

    Describe the selection sort algorithm and implement it in C language.

    Ask AI

Q.7 Solve both questions :

Ask AI
  1. Q7.1

    Explain various storage classes in C with proper examples.

    Ask AI
  2. Q7.2

    Write a program to copy the contents of one file into another and explain each step of file IO.

    Ask AI

Q.8 Solve both questions :

Ask AI
  1. Q8.1

    Explain arithmetic, relational, logical, bitwise and assignment operators in C along with their precedence rules and examples.

    Ask AI
  2. Q8.2

    What is the difference between structure and union? Explain with an example.

    Ask AI

Q.9 Write Short notes on any two of the following:

Ask AI
  1. Q9.1

    • Type Casting
    • Compiler and Interpreter
    • Quick Sort
    • String Functions
    a)

    Type Casting

    b)

    Compiler and Interpreter

    c)

    Quick Sort

    d)

    String Functions

    Ask AI

2025V3100203

B.Tech 2nd Semester Examination, 2025

03 Hours70 marks

Instructions

  • The marks are indicated in the right-hand margin.
  • There are NINE questions in this paper.
  • Attempt FIVE questions in all.
  • Question No. 1 is compulsory.

Q.1 Choose the correct option for the following questions (Answer any seven):

Ask AI
  1. Q1.1

    The correct syntax for an if-statement is

    a)

    if condition() { }

    b)

    if (condition) {}

    c)

    if (condition) []

    d)

    if {condition}

    Ask AI
  2. Q1.2

    C function execution always begins from

    a)

    main()

    b)

    constructor

    c)

    user-defined function

    d)

    header file

    Ask AI
  3. Q1.3

    Which storage class has the default value of a variable as zero?

    a)

    auto

    b)

    static

    c)

    extern

    d)

    register

    Ask AI
  4. Q1.4

    Relational operators always return

    a)

    Float value

    b)

    0 or 1

    c)

    Character

    d)

    None

    Ask AI
  5. Q1.5

    Which of the following is an exit-controlled loop?

    a)

    while loop

    b)

    for loop

    c)

    do-while loop

    d)

    None

    Ask AI
  6. Q1.6

    Binary search works only on

    a)

    Unsorted list

    b)

    Doubly linked list

    c)

    Sorted list

    d)

    Any list

    Ask AI
  7. Q1.7

    break keyword is used to

    a)

    Restart loop

    b)

    Terminate loop

    c)

    Skip iteration

    d)

    Exit program

    Ask AI
  8. Q1.8

    In a union, memory allocated is equal to the size of

    a)

    Sum of all members

    b)

    Smallest member

    c)

    Largest member

    d)

    Twice the size

    Ask AI
  9. Q1.9

    fopen("abc.txt","r") opens file in

    a)

    Write mode

    b)

    Append mode

    c)

    Read mode

    d)

    Read + Write mode

    Ask AI
  10. Q1.10

    Which of the following problems can be solved using recursion?

    a)

    Fibonacci

    b)

    Factorial

    c)

    GCD

    d)

    All of the above

    Ask AI

Q.2 Solve both questions :

Ask AI
  1. Q2.1

    Write an algorithm and draw the flowchart for checking whether a number is prime or not.

    Ask AI
  2. Q2.2

    Differentiate between syntax errors, logical errors, compile-time errors, and run-time errors. Provide suitable examples.

    Ask AI

Q.3 Solve both questions :

Ask AI
  1. Q3.1

    Explain function declaration, definition, and calling conventions in C. Discuss call by value and call by reference with examples.

    Ask AI
  2. Q3.2

    Differentiate between while and do-while loop construct. Write a program for generating Fibonacci series using loop.

    Ask AI

Q.4 Solve both questions :

Ask AI
  1. Q4.1

    Write the differences between if, if-else, and switch statements with examples.

    Ask AI
  2. Q4.2

    Explain the use of break, continue, and goto statements with examples.

    Ask AI

Q.5 Solve both questions :

Ask AI
  1. Q5.1

    How are arrays declared and initialized in C? What is bound checking? Why is it important in array programming?

    Ask AI
  2. Q5.2

    What is recursion? Explain how recursion works with stack memory. Write a recursive program for finding the factorial of a number.

    Ask AI

Q.6 Solve both questions :

Ask AI
  1. Q6.1

    Write a program to perform linear search in an array. Also find its complexity in Best, Average and Worst cases.

    Ask AI
  2. Q6.2

    Describe the selection sort algorithm and implement it in C language.

    Ask AI

Q.7 Solve both questions :

Ask AI
  1. Q7.1

    Explain various storage classes in C with proper examples.

    Ask AI
  2. Q7.2

    Write a program to copy the contents of one file into another and explain each step of file IO.

    Ask AI

Q.8 Solve both questions :

Ask AI
  1. Q8.1

    Explain arithmetic, relational, logical, bitwise and assignment operators in C along with their precedence rules and examples.

    Ask AI
  2. Q8.2

    What is the difference between structure and union? Explain with an example.

    Ask AI

Q.9 Write Short notes on any two of the following:

Ask AI
  1. Q9.1

    • Type Casting
    • Compiler and Interpreter
    • Quick Sort
    • String Functions
    a)

    Type Casting

    b)

    Compiler and Interpreter

    c)

    Quick Sort

    d)

    String Functions

    Ask AI

2025V4100203

B.Tech 2nd Semester Examination, 2025

03 Hours70 marks

Instructions

  • The marks are indicated in the right-hand margin.
  • There are NINE questions in this paper.
  • Attempt FIVE questions in all.
  • Question No. 1 is compulsory.

Q.1 Choose the correct option for the following questions (Answer any seven):

Ask AI
  1. Q1.1

    The correct syntax for an if-statement is

    a)

    if condition() { }

    b)

    if (condition) {}

    c)

    if (condition) []

    d)

    if {condition}

    Ask AI
  2. Q1.2

    C function execution always begins from

    a)

    main()

    b)

    constructor

    c)

    user-defined function

    d)

    header file

    Ask AI
  3. Q1.3

    Which storage class has the default value of a variable as zero?

    a)

    auto

    b)

    static

    c)

    extern

    d)

    register

    Ask AI
  4. Q1.4

    Relational operators always return

    a)

    Float value

    b)

    0 or 1

    c)

    Character

    d)

    None

    Ask AI
  5. Q1.5

    Which of the following is an exit-controlled loop?

    a)

    while loop

    b)

    for loop

    c)

    do-while loop

    d)

    None

    Ask AI
  6. Q1.6

    Binary search works only on

    a)

    Unsorted list

    b)

    Doubly linked list

    c)

    Sorted list

    d)

    Any list

    Ask AI
  7. Q1.7

    break keyword is used to

    a)

    Restart loop

    b)

    Terminate loop

    c)

    Skip iteration

    d)

    Exit program

    Ask AI
  8. Q1.8

    In a union, memory allocated is equal to the size of

    a)

    Sum of all members

    b)

    Smallest member

    c)

    Largest member

    d)

    Twice the size

    Ask AI
  9. Q1.9

    fopen("abc.txt","r") opens file in

    a)

    Write mode

    b)

    Append mode

    c)

    Read mode

    d)

    Read + Write mode

    Ask AI
  10. Q1.10

    Which of the following problems can be solved using recursion?

    a)

    Fibonacci

    b)

    Factorial

    c)

    GCD

    d)

    All of the above

    Ask AI

Q.2 Solve both questions :

Ask AI
  1. Q2.1

    Write an algorithm and draw the flowchart for checking whether a number is prime or not.

    Ask AI
  2. Q2.2

    Differentiate between syntax errors, logical errors, compile-time errors, and run-time errors. Provide suitable examples.

    Ask AI

Q.3 Solve both questions :

Ask AI
  1. Q3.1

    Explain function declaration, definition, and calling conventions in C. Discuss call by value and call by reference with examples.

    Ask AI
  2. Q3.2

    Differentiate between while and do-while loop construct. Write a program for generating Fibonacci series using loop.

    Ask AI

Q.4 Solve both questions :

Ask AI
  1. Q4.1

    Write the differences between if, if-else, and switch statements with examples.

    Ask AI
  2. Q4.2

    Explain the use of break, continue, and goto statements with examples.

    Ask AI

Q.5 Solve both questions :

Ask AI
  1. Q5.1

    How are arrays declared and initialized in C? What is bound checking? Why is it important in array programming?

    Ask AI
  2. Q5.2

    What is recursion? Explain how recursion works with stack memory. Write a recursive program for finding the factorial of a number.

    Ask AI

Q.6 Solve both questions :

Ask AI
  1. Q6.1

    Write a program to perform linear search in an array. Also find its complexity in Best, Average and Worst cases.

    Ask AI
  2. Q6.2

    Describe the selection sort algorithm and implement it in C language.

    Ask AI

Q.7 Solve both questions :

Ask AI
  1. Q7.1

    Explain various storage classes in C with proper examples.

    Ask AI
  2. Q7.2

    Write a program to copy the contents of one file into another and explain each step of file IO.

    Ask AI

Q.8 Solve both questions :

Ask AI
  1. Q8.1

    Explain arithmetic, relational, logical, bitwise and assignment operators in C along with their precedence rules and examples.

    Ask AI
  2. Q8.2

    What is the difference between structure and union? Explain with an example.

    Ask AI

Q.9 Write Short notes on any two of the following:

Ask AI

2025V5100203

B.Tech 2nd Semester Examination, 2025

03 Hours70 marks

Instructions

  • The marks are indicated in the right-hand margin.
  • There are NINE questions in this paper.
  • Attempt FIVE questions in all.
  • Question No. 1 is compulsory.

Q.1 Choose the correct option for the following questions (Answer any seven):

Ask AI
  1. Q1.1

    The correct syntax for an if-statement is

    a)

    if condition() { }

    b)

    if (condition) {}

    c)

    if (condition) []

    d)

    if {condition}

    Ask AI
  2. Q1.2

    C function execution always begins from

    a)

    main()

    b)

    constructor

    c)

    user-defined function

    d)

    header file

    Ask AI
  3. Q1.3

    Which storage class has the default value of a variable as zero?

    a)

    auto

    b)

    static

    c)

    extern

    d)

    register

    Ask AI
  4. Q1.4

    Relational operators always return

    a)

    Float value

    b)

    0 or 1

    c)

    Character

    d)

    None

    Ask AI
  5. Q1.5

    Which of the following is an exit-controlled loop?

    a)

    while loop

    b)

    for loop

    c)

    do-while loop

    d)

    None

    Ask AI
  6. Q1.6

    Binary search works only on

    a)

    Unsorted list

    b)

    Doubly linked list

    c)

    Sorted list

    d)

    Any list

    Ask AI
  7. Q1.7

    break keyword is used to

    a)

    Restart loop

    b)

    Terminate loop

    c)

    Skip iteration

    d)

    Exit program

    Ask AI
  8. Q1.8

    In a union, memory allocated is equal to the size of

    a)

    Sum of all members

    b)

    Smallest member

    c)

    Largest member

    d)

    Twice the size

    Ask AI
  9. Q1.9

    fopen("abc.txt","r") opens file in

    a)

    Write mode

    b)

    Append mode

    c)

    Read mode

    d)

    Read + Write mode

    Ask AI
  10. Q1.10

    Which of the following problems can be solved using recursion?

    a)

    Fibonacci

    b)

    Factorial

    c)

    GCD

    d)

    All of the above

    Ask AI

Q.2 Solve both questions :

Ask AI
  1. Q2.1

    Write an algorithm and draw the flowchart for checking whether a number is prime or not.

    Ask AI
  2. Q2.2

    Differentiate between syntax errors, logical errors, compile-time errors, and run-time errors. Provide suitable examples.

    Ask AI

Q.3 Solve both questions :

Ask AI
  1. Q3.1

    Explain function declaration, definition, and calling conventions in C. Discuss call by value and call by reference with examples.

    Ask AI
  2. Q3.2

    Differentiate between while and do-while loop construct. Write a program for generating Fibonacci series using loop.

    Ask AI

Q.4 Solve both questions :

Ask AI
  1. Q4.1

    Write the differences between if, if-else, and switch statements with examples.

    Ask AI
  2. Q4.2

    Explain the use of break, continue, and goto statements with examples.

    Ask AI

Q.5 Solve both questions :

Ask AI
  1. Q5.1

    How are arrays declared and initialized in C? What is bound checking? Why is it important in array programming?

    Ask AI
  2. Q5.2

    What is recursion? Explain how recursion works with stack memory. Write a recursive program for finding the factorial of a number.

    Ask AI

Q.6 Solve both questions :

Ask AI
  1. Q6.1

    Write a program to perform linear search in an array. Also find its complexity in Best, Average and Worst cases.

    Ask AI
  2. Q6.2

    Describe the selection sort algorithm and implement it in C language.

    Ask AI

Q.7 Solve both questions :

Ask AI
  1. Q7.1

    Explain various storage classes in C with proper examples.

    Ask AI
  2. Q7.2

    Write a program to copy the contents of one file into another and explain each step of file IO.

    Ask AI

Q.8 Solve both questions :

Ask AI
  1. Q8.1

    Explain arithmetic, relational, logical, bitwise and assignment operators in C along with their precedence rules and examples.

    Ask AI
  2. Q8.2

    What is the difference between structure and union? Explain with an example.

    Ask AI

Q.9 Write Short notes on any two of the following:

Ask AI
  1. Q9.1

    a)

    Type Casting

    b)

    Compiler and Interpreter

    c)

    Quick Sort

    d)

    String Functions

    Ask AI

2025100204

B.Tech 2nd Semester Examination, 2025 (Old Course)

03 Hours70 marks

Instructions

  • The marks are indicated in the right-hand margin.
  • There are NINE questions in this paper.
  • Attempt FIVE questions in all.
  • Question No. 1 is compulsory.

Q.1 Choose the correct option/answer the following (Any seven question only):

Ask AI
  1. Q1.1

    Which of the following cannot be a variable name in C?

    a)

    volatile

    b)

    true

    c)

    friend

    d)

    export

    Ask AI
  2. Q1.2

    Which of the following typecasting is accepted by C language

    a)

    Widening conversions

    b)

    Narrowing conversions

    c)

    Widening & Narrowing conversions

    d)

    None of the mentioned

    Ask AI
  3. Q1.3

    Which of the following is NOT possible with any 2 operators in C?

    a)

    Different precedence, same associativity

    b)

    Different precedence, different associativity

    c)

    Same precedence, different associativity

    d)

    All of the mentioned

    Ask AI
  4. Q1.4

    Functions can return enumeration constants in C?

    a)

    true

    b)

    false

    c)

    depends on the compiler

    d)

    depends on the standard

    Ask AI
  5. Q1.5

    C preprocessors can have compiler specific features.

    a)

    True

    b)

    False

    c)

    Depends on the standard

    d)

    Depends on the platform

    Ask AI
  6. Q1.6

    How many number of pointer (*) does C have against a pointer variable declaration?

    a)

    7

    b)

    127

    c)

    255

    d)

    No limits

    Ask AI
  7. Q1.7

    Which of the following is not possible statically in C language?

    a)

    Jagged Array

    b)

    Rectangular Array

    c)

    Cuboidal Array

    d)

    Multidimensional Array

    Ask AI
  8. Q1.8

    What will be the value of the following assignment expression?
    (x = foo())!=1 considering foo() returns 2

    a)

    2

    b)

    True

    c)

    1

    d)

    0

    Ask AI
  9. Q1.9

    Comment on the following C statement
    n=1; printf("%d, %d ", 3*n, n++);

    a)

    Output will be 3, 2

    b)

    Output will be 3, 1

    c)

    Output will be 6, 1

    d)

    Output is compiler dependent

    Ask AI
  10. Q1.10

    What are the elements present in the array of the following C code?
    int array[5]={5};

    a)

    5, 5, 5, 5, 5

    b)

    5, 0, 0, 0, 0

    c)

    5, NULL, NULL, NULL, NULL

    d)

    5

    Ask AI

Q.2 Solve both questions :

Ask AI
  1. Q2.1

    Explain the major components of a computer system. How does the operating system help in program execution?

    Ask AI
  2. Q2.2

    Write an algorithm and flowchart to find the largest of three numbers.

    Ask AI

Q.3 Solve both questions :

Ask AI
  1. Q3.1

    Explain the different arithmetic operators in C. Write the rules for evaluating arithmetic expressions with precedence and associativity.

    Ask AI
  2. Q3.2

    Write a program to reverse a number using a loop. Explain the concept of an infinite loop with examples. Why do infinite loops occur?

    Ask AI

Q.4 Solve both questions :

Ask AI
  1. Q4.1

    Explain array declaration and initialization with examples for 1-D and 2-D arrays. Also explain the concept of bound checking.

    Ask AI
  2. Q4.2

    Write a C program to perform Binary Search on a sorted array.

    Ask AI

Q.5 Solve both questions :

Ask AI
  1. Q5.1

    What is call by reference? How is passing an array to a function an example of call by reference? Explain with code.

    Ask AI
  2. Q5.2

    Write a program that reads marks of 5 students into an array and uses a function to compute the average. Demonstrate passing an array to a function.

    Ask AI

Q.6 Solve both questions :

Ask AI
  1. Q6.1

    Define a structure Student with name, roll, marks. Write a C program to input data for 3 students and print it.

    Ask AI
  2. Q6.2

    Write a note on accessing structure elements using (a) dot operator, (b) pointer-to-structure. Give examples.

    Ask AI

Q.7 Solve both questions :

Ask AI
  1. Q7.1

    Explain the concept of pointers in C. How are pointers defined and used? Illustrate with a program that swaps two numbers using pointers.

    Ask AI
  2. Q7.2

    Write a C program using pointers to reverse an array in-place. Explain how pointers are used in the program.

    Ask AI

Q.8 Solve both questions :

Ask AI
  1. Q8.1

    Write a recursive C program to find the factorial of a number. Also explain base case and recursive case.

    Ask AI
  2. Q8.2

    Explain the Ackermann function. Write a recursive program for it. Why is it not suitable for large values?

    Ask AI

Q.9 Write short notes on any two of the following:

Ask AI
  1. Q9.1

    a)

    Self-Referential Structures

    b)

    Global and Static Variables

    c)

    Type Casting in C

    d)

    Compiler and Linker

    Ask AI

2025OLD100204

B.Tech 2nd Semester Examination, 2025 (Old Course)

03 Hours70 marks

Instructions

  • The marks are indicated in the right-hand margin.
  • There are NINE questions in this paper.
  • Attempt FIVE questions in all.
  • Question No. 1 is compulsory.

Q.1 Choose the correct option/answer the following (Any seven question only):

Ask AI
  1. Q1.1

    Which of the following cannot be a variable name in C?

    a)

    volatile

    b)

    true

    c)

    friend

    d)

    export

    Ask AI
  2. Q1.2

    Which of the following typecasting is accepted by C language

    a)

    Widening conversions

    b)

    Narrowing conversions

    c)

    Widening & Narrowing conversions

    d)

    None of the mentioned

    Ask AI
  3. Q1.3

    Which of the following is NOT possible with any 2 operators in C?

    a)

    Different precedence, same associativity

    b)

    Different precedence, different associativity

    c)

    Same precedence, different associativity

    d)

    All of the mentioned

    Ask AI
  4. Q1.4

    Functions can return enumeration constants in C?

    a)

    true

    b)

    false

    c)

    depends on the compiler

    d)

    depends on the standard

    Ask AI
  5. Q1.5

    C preprocessors can have compiler specific features.

    a)

    True

    b)

    False

    c)

    Depends on the standard

    d)

    Depends on the platform

    Ask AI
  6. Q1.6

    How many number of pointer (*) does C have against a pointer variable declaration?

    a)

    7

    b)

    127

    c)

    255

    d)

    No limits

    Ask AI
  7. Q1.7

    Which of the following is not possible statically in C language?

    a)

    Jagged Array

    b)

    Rectangular Array

    c)

    Cuboidal Array

    d)

    Multidimensional Array

    Ask AI
  8. Q1.8

    What will be the value of the following assignment expression?
    (x = foo())!=1 considering foo() returns 2

    a)

    2

    b)

    True

    c)

    1

    d)

    0

    Ask AI
  9. Q1.9

    Comment on the following C statement
    n=1; printf("%d, %d ", 3*n, n++);

    a)

    Output will be 3, 2

    b)

    Output will be 3, 1

    c)

    Output will be 6, 1

    d)

    Output is compiler dependent

    Ask AI
  10. Q1.10

    What are the elements present in the array of the following C code?
    int array[5]={5};

    a)

    5, 5, 5, 5, 5

    b)

    5, 0, 0, 0, 0

    c)

    5, NULL, NULL, NULL, NULL

    d)

    5

    Ask AI

Q.2 Solve both questions :

Ask AI
  1. Q2.1

    Explain the major components of a computer system. How does the operating system help in program execution?

    Ask AI
  2. Q2.2

    Write an algorithm and flowchart to find the largest of three numbers.

    Ask AI

Q.3 Solve both questions :

Ask AI
  1. Q3.1

    Explain the different arithmetic operators in C. Write the rules for evaluating arithmetic expressions with precedence and associativity.

    Ask AI
  2. Q3.2

    Write a program to reverse a number using a loop. Explain the concept of an infinite loop with examples. Why do infinite loops occur?

    Ask AI

Q.4 Solve both questions :

Ask AI
  1. Q4.1

    Explain array declaration and initialization with examples for 1-D and 2-D arrays. Also explain the concept of bound checking.

    Ask AI
  2. Q4.2

    Write a C program to perform Binary Search on a sorted array.

    Ask AI

Q.5 Solve both questions :

Ask AI
  1. Q5.1

    What is call by reference? How is passing an array to a function an example of call by reference? Explain with code.

    Ask AI
  2. Q5.2

    Write a program that reads marks of 5 students into an array and uses a function to compute the average. Demonstrate passing an array to a function.

    Ask AI

Q.6 Solve both questions :

Ask AI
  1. Q6.1

    Define a structure Student with name, roll, marks. Write a C program to input data for 3 students and print it.

    Ask AI
  2. Q6.2

    Write a note on accessing structure elements using (a) dot operator, (b) pointer-to-structure. Give examples.

    Ask AI

Q.7 Solve both questions :

Ask AI
  1. Q7.1

    Explain the concept of pointers in C. How are pointers defined and used? Illustrate with a program that swaps two numbers using pointers.

    Ask AI
  2. Q7.2

    Write a C program using pointers to reverse an array in-place. Explain how pointers are used in the program.

    Ask AI

Q.8 Solve both questions :

Ask AI
  1. Q8.1

    Write a recursive C program to find the factorial of a number. Also explain base case and recursive case.

    Ask AI
  2. Q8.2

    Explain the Ackermann function. Write a recursive program for it. Why is it not suitable for large values?

    Ask AI

Q.9 Write short notes on any two of the following:

Ask AI

2024100104

B.Tech 1st Semester Examination, 2024 (Old)

03 Hours70 marks

Instructions

  • The marks are indicated in the right-hand margin.
  • There are NINE questions in this paper.
  • Attempt FIVE questions in all.
  • Question No. 1 is compulsory.

Q.1 Choose the correct option for the following questions (Answer any seven only):

Ask AI
  1. Q1.1

    Where is a program stored and executed?

    a)

    Hard Disk

    b)

    Main Memory (RAM)

    c)

    Cache

    d)

    ROM

    Ask AI
  2. Q1.2

    What is the output of a compiler?

    a)

    Source code

    b)

    Flowchart

    c)

    Executable code

    d)

    Algorithm

    Ask AI
  3. Q1.3

    Which storage class has the default value of a variable as zero?

    a)

    auto

    b)

    extern

    c)

    static

    d)

    register

    Ask AI
  4. Q1.4

    What is the result of 5% 2 in C?

    a)

    2.5

    b)

    1

    c)

    2

    d)

    0

    Ask AI
  5. Q1.5

    What type of array is used to store string?

    a)

    int

    b)

    float

    c)

    char

    d)

    double

    Ask AI
  6. Q1.6

    Binary search works only on:

    a)

    Unsorted list

    b)

    Doubly linked list

    c)

    Sorted list

    d)

    Any list

    Ask AI
  7. Q1.7

    Which operator is used to access members of a structure using a pointer?

    a)

    .

    b)

    ->

    c)
    d)

    &

    Ask AI
  8. Q1.8

    What is the output of ∗(&x)*(\&x) in C?

    a)

    Address of x

    b)

    Error

    c)

    Value of x

    d)

    Nothing

    Ask AI
  9. Q1.9

    Which function is used to open a file in C?

    a)

    fopen()

    b)

    file()

    c)

    openfile()

    d)

    fcreate()

    Ask AI
  10. Q1.10

    Which of the following problems can be solved using recursion?

    a)

    Fibonacci

    b)

    GCD

    c)

    Factorial

    d)

    All of the above

    Ask AI

Q.2 Solve both questions :

Ask AI
  1. Q2.1

    Draw a flowchart to find the largest of three numbers.

    Ask AI
  2. Q2.2

    Explain different storage classes in C.

    Ask AI

Q.3 Solve both questions :

Ask AI
  1. Q3.1

    What is type casting in programming? Differentiate between implicit and explicit type conversion with examples.

    Ask AI
  2. Q3.2

    Explain operator precedence and associativity with examples.

    Ask AI

Q.4 Solve both questions :

Ask AI
  1. Q4.1

    Write the differences between if, if-else, and switch statements with examples.

    Ask AI
  2. Q4.2

    Explain the concept of pointer to pointer with a code example. What is a self-referential structure?

    Ask AI

Q.5 Solve both questions :

Ask AI
  1. Q5.1

    How are arrays declared and initialized in C? What is bound checking? Why is it important in array programming?

    Ask AI
  2. Q5.2

    Explain the different modes of opening a file in C. Give examples.

    Ask AI

Q.6 Solve both questions :

Ask AI
  1. Q6.1

    Write a program to perform linear search in an array.

    Ask AI
  2. Q6.2

    Describe the bubble sort algorithm and write its implementation in C.

    Ask AI

Q.7 Solve both questions :

Ask AI
  1. Q7.1

    What is the difference between call by value and call by reference? Explain with examples.

    Ask AI
  2. Q7.2

    What is the scope of a variable? Explain local and global scope with examples.

    Ask AI

Q.8 Solve both questions :

Ask AI
  1. Q8.1

    What is recursion? Write a recursive function to compute the nth Fibonacci number.

    Ask AI
  2. Q8.2

    What is the difference between structure and union? Explain with an example.

    Ask AI

Q.9 Write Short notes on any two of the following:

Ask AI
  1. Q9.1

    Self-Referential Structure

    Ask AI
  2. Q9.2

    Compiler and Linker

    Ask AI
  3. Q9.3

    Syntax and logical errors

    Ask AI
  4. Q9.4

    Bitwise Operator

    Ask AI

2024V3100104

B.Tech 1st Semester Examination, 2024 (Old)

03 Hours70 marks

Instructions

  • The marks are indicated in the right-hand margin.
  • There are NINE questions in this paper.
  • Attempt FIVE questions in all.
  • Question No. 1 is compulsory.

Q.1 Choose the correct option for the following questions (Answer any seven only):

Ask AI
  1. Q1.1

    Where is a program stored and executed?

    a)

    Hard Disk

    b)

    Main Memory (RAM)

    c)

    Cache

    d)

    ROM

    Ask AI
  2. Q1.2

    What is the output of a compiler?

    a)

    Source code

    b)

    Flowchart

    c)

    Executable code

    d)

    Algorithm

    Ask AI
  3. Q1.3

    Which storage class has the default value of a variable as zero?

    a)

    auto

    b)

    extern

    c)

    static

    d)

    register

    Ask AI
  4. Q1.4

    What is the result of 5% 2 in C?

    a)

    2.5

    b)

    1

    c)

    2

    d)

    0

    Ask AI
  5. Q1.5

    What type of array is used to store string?

    a)

    int

    b)

    float

    c)

    char

    d)

    double

    Ask AI
  6. Q1.6

    Binary search works only on:

    a)

    Unsorted list

    b)

    Doubly linked list

    c)

    Sorted list

    d)

    Any list

    Ask AI
  7. Q1.7

    Which operator is used to access members of a structure using a pointer?

    a)

    .

    b)

    ->

    c)
    d)

    &

    Ask AI
  8. Q1.8

    What is the output of ∗(&x)*(\&x) in C?

    a)

    Address of x

    b)

    Error

    c)

    Value of x

    d)

    Nothing

    Ask AI
  9. Q1.9

    Which function is used to open a file in C?

    a)

    fopen()

    b)

    file()

    c)

    openfile()

    d)

    fcreate()

    Ask AI
  10. Q1.10

    Which of the following problems can be solved using recursion?

    a)

    Fibonacci

    b)

    GCD

    c)

    Factorial

    d)

    All of the above

    Ask AI

Q.2 Solve both questions :

Ask AI
  1. Q2.1

    Draw a flowchart to find the largest of three numbers.

    Ask AI
  2. Q2.2

    Explain different storage classes in C.

    Ask AI

Q.3 Solve both questions :

Ask AI
  1. Q3.1

    What is type casting in programming? Differentiate between implicit and explicit type conversion with examples.

    Ask AI
  2. Q3.2

    Explain operator precedence and associativity with examples.

    Ask AI

Q.4 Solve both questions :

Ask AI
  1. Q4.1

    Write the differences between if, if-else, and switch statements with examples.

    Ask AI
  2. Q4.2

    Explain the concept of pointer to pointer with a code example. What is a self-referential structure?

    Ask AI

Q.5 Solve both questions :

Ask AI
  1. Q5.1

    How are arrays declared and initialized in C? What is bound checking? Why is it important in array programming?

    Ask AI
  2. Q5.2

    Explain the different modes of opening a file in C. Give examples.

    Ask AI

Q.6 Solve both questions :

Ask AI
  1. Q6.1

    Write a program to perform linear search in an array.

    Ask AI
  2. Q6.2

    Describe the bubble sort algorithm and write its implementation in C.

    Ask AI

Q.7 Solve both questions :

Ask AI
  1. Q7.1

    What is the difference between call by value and call by reference? Explain with examples.

    Ask AI
  2. Q7.2

    What is the scope of a variable? Explain local and global scope with examples.

    Ask AI

Q.8 Solve both questions :

Ask AI
  1. Q8.1

    What is recursion? Write a recursive function to compute the nth Fibonacci number.

    Ask AI
  2. Q8.2

    What is the difference between structure and union? Explain with an example.

    Ask AI

Q.9 Write Short notes on any two of the following:

Ask AI
  1. Q9.1

    Self-Referential Structure

    Ask AI
  2. Q9.2

    Compiler and Linker

    Ask AI
  3. Q9.3

    Syntax and logical errors

    Ask AI
  4. Q9.4

    Bitwise Operator

    Ask AI

2024V5100104

B.Tech 1st Semester Examination, 2024 (Old)

03 Hours70 marks

Instructions

  • The marks are indicated in the right-hand margin.
  • There are NINE questions in this paper.
  • Attempt FIVE questions in all.
  • Question No. 1 is compulsory.

Q.1 Choose the correct option for the following questions (Answer any seven only):

Ask AI
  1. Q1.1

    Where is a program stored and executed?

    a)

    Hard Disk

    b)

    Main Memory (RAM)

    c)

    Cache

    d)

    ROM

    Ask AI
  2. Q1.2

    What is the output of a compiler?

    a)

    Source code

    b)

    Flowchart

    c)

    Executable code

    d)

    Algorithm

    Ask AI
  3. Q1.3

    Which storage class has the default value of a variable as zero?

    a)

    auto

    b)

    extern

    c)

    static

    d)

    register

    Ask AI
  4. Q1.4

    What is the result of 5% 2 in C?

    a)

    2.5

    b)

    1

    c)

    2

    d)

    0

    Ask AI
  5. Q1.5

    What type of array is used to store string?

    a)

    int

    b)

    float

    c)

    char

    d)

    double

    Ask AI
  6. Q1.6

    Binary search works only on:

    a)

    Unsorted list

    b)

    Doubly linked list

    c)

    Sorted list

    d)

    Any list

    Ask AI
  7. Q1.7

    Which operator is used to access members of a structure using a pointer?

    a)

    .

    b)

    ->

    c)
    d)

    &

    Ask AI
  8. Q1.8

    What is the output of ∗(&x)*(\&x) in C?

    a)

    Address of x

    b)

    Error

    c)

    Value of x

    d)

    Nothing

    Ask AI
  9. Q1.9

    Which function is used to open a file in C?

    a)

    fopen()

    b)

    file()

    c)

    openfile()

    d)

    fcreate()

    Ask AI
  10. Q1.10

    Which of the following problems can be solved using recursion?

    a)

    Fibonacci

    b)

    GCD

    c)

    Factorial

    d)

    All of the above

    Ask AI

Q.2 Solve both questions :

Ask AI
  1. Q2.1

    Draw a flowchart to find the largest of three numbers.

    Ask AI
  2. Q2.2

    Explain different storage classes in C.

    Ask AI

Q.3 Solve both questions :

Ask AI
  1. Q3.1

    What is type casting in programming? Differentiate between implicit and explicit type conversion with examples.

    Ask AI
  2. Q3.2

    Explain operator precedence and associativity with examples.

    Ask AI

Q.4 Solve both questions :

Ask AI
  1. Q4.1

    Write the differences between if, if-else, and switch statements with examples.

    Ask AI
  2. Q4.2

    Explain the concept of pointer to pointer with a code example. What is a self-referential structure?

    Ask AI

Q.5 Solve both questions :

Ask AI
  1. Q5.1

    How are arrays declared and initialized in C? What is bound checking? Why is it important in array programming?

    Ask AI
  2. Q5.2

    Explain the different modes of opening a file in C. Give examples.

    Ask AI

Q.6 Solve both questions :

Ask AI
  1. Q6.1

    Write a program to perform linear search in an array.

    Ask AI
  2. Q6.2

    Describe the bubble sort algorithm and write its implementation in C.

    Ask AI

Q.7 Solve both questions :

Ask AI
  1. Q7.1

    What is the difference between call by value and call by reference? Explain with examples.

    Ask AI
  2. Q7.2

    What is the scope of a variable? Explain local and global scope with examples.

    Ask AI

Q.8 Solve both questions :

Ask AI
  1. Q8.1

    What is recursion? Write a recursive function to compute the nth Fibonacci number.

    Ask AI
  2. Q8.2

    What is the difference between structure and union? Explain with an example.

    Ask AI

Q.9 Write Short notes on any two of the following:

Ask AI
  1. Q9.1

    Self-Referential Structure

    Ask AI
  2. Q9.2

    Compiler and Linker

    Ask AI
  3. Q9.3

    Syntax and logical errors

    Ask AI
  4. Q9.4

    Bitwise Operator

    Ask AI

2024V7100104

B.Tech 1st Semester Examination, 2024 (Old)

03 Hours70 marks

Instructions

  • The marks are indicated in the right-hand margin.
  • There are NINE questions in this paper.
  • Attempt FIVE questions in all.
  • Question No. 1 is compulsory.

Q.1 Choose the correct option for the following questions (Answer any seven only):

Ask AI
  1. Q1.1

    Where is a program stored and executed?

    a)

    Hard Disk

    b)

    Main Memory (RAM)

    c)

    Cache

    d)

    ROM

    Ask AI
  2. Q1.2

    What is the output of a compiler?

    a)

    Source code

    b)

    Flowchart

    c)

    Executable code

    d)

    Algorithm

    Ask AI
  3. Q1.3

    Which storage class has the default value of a variable as zero?

    a)

    auto

    b)

    extern

    c)

    static

    d)

    register

    Ask AI
  4. Q1.4

    What is the result of 5% 2 in C?

    a)

    2.5

    b)

    1

    c)

    2

    d)

    0

    Ask AI
  5. Q1.5

    What type of array is used to store string?

    a)

    int

    b)

    float

    c)

    char

    d)

    double

    Ask AI
  6. Q1.6

    Binary search works only on:

    a)

    Unsorted list

    b)

    Doubly linked list

    c)

    Sorted list

    d)

    Any list

    Ask AI
  7. Q1.7

    Which operator is used to access members of a structure using a pointer?

    a)

    .

    b)

    ->

    c)
    d)

    &

    Ask AI
  8. Q1.8

    What is the output of $ *(\&x) $ in C?

    a)

    Address of x

    b)

    Error

    c)

    Value of x

    d)

    Nothing

    Ask AI
  9. Q1.9

    Which function is used to open a file in C?

    a)

    fopen()

    b)

    file()

    c)

    openfile()

    d)

    fcreate()

    Ask AI
  10. Q1.10

    Which of the following problems can be solved using recursion?

    a)

    Fibonacci

    b)

    GCD

    c)

    Factorial

    d)

    All of the above

    Ask AI

Q.2 Solve both questions :

Ask AI
  1. Q2.1

    Draw a flowchart to find the largest of three numbers.

    Ask AI
  2. Q2.2

    Explain different storage classes in C.

    Ask AI

Q.3 Solve both questions :

Ask AI
  1. Q3.1

    What is type casting in programming? Differentiate between implicit and explicit type conversion with examples.

    Ask AI
  2. Q3.2

    Explain operator precedence and associativity with examples.

    Ask AI

Q.4 Solve both questions :

Ask AI
  1. Q4.1

    Write the differences between if, if-else, and switch statements with examples.

    Ask AI
  2. Q4.2

    Explain the concept of pointer to pointer with a code example. What is a self-referential structure?

    Ask AI

Q.5 Solve both questions :

Ask AI
  1. Q5.1

    How are arrays declared and initialized in C? What is bound checking? Why is it important in array programming?

    Ask AI
  2. Q5.2

    Explain the different modes of opening a file in C. Give examples.

    Ask AI

Q.6 Solve both questions :

Ask AI
  1. Q6.1

    Write a program to perform linear search in an array.

    Ask AI
  2. Q6.2

    Describe the bubble sort algorithm and write its implementation in C.

    Ask AI

Q.7 Solve both questions :

Ask AI
  1. Q7.1

    What is the difference between call by value and call by reference? Explain with examples.

    Ask AI
  2. Q7.2

    What is the scope of a variable? Explain local and global scope with examples.

    Ask AI

Q.8 Solve both questions :

Ask AI
  1. Q8.1

    What is recursion? Write a recursive function to compute the nth Fibonacci number.

    Ask AI
  2. Q8.2

    What is the difference between structure and union? Explain with an example.

    Ask AI

Q.9 Write Short notes on any two of the following:

Ask AI
  1. Q9.1

    Self-Referential Structure

    Ask AI
  2. Q9.2

    Compiler and Linker

    Ask AI
  3. Q9.3

    Syntax and logical errors

    Ask AI
  4. Q9.4

    Bitwise Operator

    Ask AI

2024V9100104

B.Tech 1st Semester Examination, 2024 (Old)

03 Hours70 marks

Instructions

  • The marks are indicated in the right-hand margin.
  • There are NINE questions in this paper.
  • Attempt FIVE questions in all.
  • Question No. 1 is compulsory.

Q.1 Choose the correct option for the following questions (Answer any seven only):

Ask AI
  1. Q1.1

    Where is a program stored and executed?

    a)

    Hard Disk

    b)

    Main Memory (RAM)

    c)

    Cache

    d)

    ROM

    Ask AI
  2. Q1.2

    What is the output of a compiler?

    a)

    Source code

    b)

    Flowchart

    c)

    Executable code

    d)

    Algorithm

    Ask AI
  3. Q1.3

    Which storage class has the default value of a variable as zero?

    a)

    auto

    b)

    extern

    c)

    static

    d)

    register

    Ask AI
  4. Q1.4

    What is the result of 5% 2 in C?

    a)

    2.5

    b)

    1

    c)

    2

    d)

    0

    Ask AI
  5. Q1.5

    What type of array is used to store string?

    a)

    int

    b)

    float

    c)

    char

    d)

    double

    Ask AI
  6. Q1.6

    Binary search works only on:

    a)

    Unsorted list

    b)

    Doubly linked list

    c)

    Sorted list

    d)

    Any list

    Ask AI
  7. Q1.7

    Which operator is used to access members of a structure using a pointer?

    a)

    .

    b)

    ->

    c)
    d)

    &

    Ask AI
  8. Q1.8

    What is the output of $ *(\&x) $ in C?

    a)

    Address of x

    b)

    Error

    c)

    Value of x

    d)

    Nothing

    Ask AI
  9. Q1.9

    Which function is used to open a file in C?

    a)

    fopen()

    b)

    file()

    c)

    openfile()

    d)

    fcreate()

    Ask AI
  10. Q1.10

    Which of the following problems can be solved using recursion?

    a)

    Fibonacci

    b)

    GCD

    c)

    Factorial

    d)

    All of the above

    Ask AI

Q.2 Solve both questions :

Ask AI
  1. Q2.1

    Draw a flowchart to find the largest of three numbers.

    Ask AI
  2. Q2.2

    Explain different storage classes in C.

    Ask AI

Q.3 Solve both questions :

Ask AI
  1. Q3.1

    What is type casting in programming? Differentiate between implicit and explicit type conversion with examples.

    Ask AI
  2. Q3.2

    Explain operator precedence and associativity with examples.

    Ask AI

Q.4 Solve both questions :

Ask AI
  1. Q4.1

    Write the differences between if, if-else, and switch statements with examples.

    Ask AI
  2. Q4.2

    Explain the concept of pointer to pointer with a code example. What is a self-referential structure?

    Ask AI

Q.5 Solve both questions :

Ask AI
  1. Q5.1

    How are arrays declared and initialized in C? What is bound checking? Why is it important in array programming?

    Ask AI
  2. Q5.2

    Explain the different modes of opening a file in C. Give examples.

    Ask AI

Q.6 Solve both questions :

Ask AI
  1. Q6.1

    Write a program to perform linear search in an array.

    Ask AI
  2. Q6.2

    Describe the bubble sort algorithm and write its implementation in C.

    Ask AI

Q.7 Solve both questions :

Ask AI
  1. Q7.1

    What is the difference between call by value and call by reference? Explain with examples.

    Ask AI
  2. Q7.2

    What is the scope of a variable? Explain local and global scope with examples.

    Ask AI

Q.8 Solve both questions :

Ask AI
  1. Q8.1

    What is recursion? Write a recursive function to compute the nth Fibonacci number.

    Ask AI
  2. Q8.2

    What is the difference between structure and union? Explain with an example.

    Ask AI

Q.9 Write Short notes on any two of the following:

Ask AI
  1. Q9.1

    Self-Referential Structure

    Ask AI
  2. Q9.2

    Compiler and Linker

    Ask AI
  3. Q9.3

    Syntax and logical errors

    Ask AI
  4. Q9.4

    Bitwise Operator

    Ask AI

2024100111

B.Tech 1st Semester Examination, 2024

03 Hours70 marks

Instructions

  • The marks are indicated in the right-hand margin.
  • There are NINE questions in this paper.
  • Attempt FIVE questions in all.
  • Question No. 1 is compulsory.

Q.1 Choose the correct answer the following (Any seven question only):

Ask AI
  1. Q1.1

    Which of the following is a valid variable name in C?

    a)

    2value

    b)

    @value

    c)

    value_2

    d)

    value#2

    Ask AI
  2. Q1.2

    Which of these is not a valid data type in C?

    a)

    int

    b)

    real

    c)

    float

    d)

    char

    Ask AI
  3. Q1.3

    Which of the following is the correct syntax for if statement?

    a)

    if [condition] then

    b)

    if condition then

    c)

    if (condition)

    d)

    if {condition}

    Ask AI
  4. Q1.4

    What is the output of printf("%d", 5 + 3 * 2)?

    a)

    16

    b)

    11

    c)

    10

    d)

    13

    Ask AI
  5. Q1.5

    Which header file is required to use printf()?

    a)

    stdlib.h

    b)

    conio.h

    c)

    stdio.h

    d)

    string.h

    Ask AI
  6. Q1.6

    Which keyword is used to define a constant in C?

    a)

    final

    b)

    constant

    c)

    #define

    d)

    static

    Ask AI
  7. Q1.7

    What is the index of the first element in an array?

    a)

    1

    b)

    -1

    c)

    0

    d)

    Depends on array

    Ask AI
  8. Q1.8

    Which one is the logical AND operator in C?

    a)

    &

    b)

    |

    c)

    &&

    d)

    ||

    Ask AI
  9. Q1.9

    Which format specifier is used for printing float values?

    a)

    %d

    b)

    %c

    c)

    %f

    d)

    %x

    Ask AI
  10. Q1.10

    Which of these is not a loop in C?

    a)

    for

    b)

    while

    c)

    do-while

    d)

    repeat-until

    Ask AI

Q.2 Solve both questions :

Ask AI
  1. Q2.1

    Explain the structure of a C program with an example.

    Ask AI
  2. Q2.2

    Describe basic data types in C with memory size.

    Ask AI

Q.3 Solve both questions :

Ask AI
  1. Q3.1

    What is an algorithm. Write an algorithm to perform the addition of two numbers in C and draw a flowchart to represent the addition of two numbers.

    Ask AI
  2. Q3.2

    Write a program to check whether a number is even or odd using if-else.

    Ask AI

Q.4 Solve both questions :

Ask AI
  1. Q4.1

    Explain Arithmetic and Logical operators in C with example programs.

    Ask AI
  2. Q4.2

    Explain Relational and Bitwise operators with example programs.

    Ask AI

Q.5 Solve both questions :

Ask AI
  1. Q5.1

    Explain call by value and call by reference with examples.

    Ask AI
  2. Q5.2

    What is the difference between library functions and user-defined functions?

    Ask AI

Q.6 Solve both questions :

Ask AI
  1. Q6.1

    What is an array in C programming? Write advantages of using arrays. Explain a one-dimensional array with a suitable example program.

    Ask AI
  2. Q6.2

    Describe the difference between character array and string.

    Ask AI

Q.7 Solve both questions :

Ask AI
  1. Q7.1

    Write the difference Between Array and Structure in C programming.

    Ask AI
  2. Q7.2

    Write the difference Between Structure and Union in C programming.

    Ask AI

Q.8 Solve both questions :

Ask AI
  1. Q8.1

    What is a pointer? Explain pointer declaration and initialization with sample program.

    Ask AI
  2. Q8.2

    What is file? Explain text file and binary file in details.

    Ask AI

Q.9 Write short notes on any two of the following:

Ask AI
  1. Q9.1

    a)

    Structure

    b)

    Union

    c)

    Recursion

    d)

    Fibonacci series program

    Ask AI

2024V2100111

B.Tech 1st Semester Examination, 2024

03 Hours70 marks

Instructions

  • The marks are indicated in the right-hand margin.
  • There are NINE questions in this paper.
  • Attempt FIVE questions in all.
  • Question No. 1 is compulsory.

Q.1 Choose the correct answer the following (Any seven question only):

Ask AI
  1. Q1.1

    Which of the following is a valid variable name in C?

    a)

    2value

    b)

    @value

    c)

    value_2

    d)

    value#2

    Ask AI
  2. Q1.2

    Which of these is not a valid data type in C?

    a)

    int

    b)

    real

    c)

    float

    d)

    char

    Ask AI
  3. Q1.3

    Which of the following is the correct syntax for if statement?

    a)

    if [condition] then

    b)

    if condition then

    c)

    if (condition)

    d)

    if {condition}

    Ask AI
  4. Q1.4

    What is the output of printf("%d", 5 + 3 * 2)?

    a)

    16

    b)

    11

    c)

    10

    d)

    13

    Ask AI
  5. Q1.5

    Which header file is required to use printf()?

    a)

    stdlib.h

    b)

    conio.h

    c)

    stdio.h

    d)

    string.h

    Ask AI
  6. Q1.6

    Which keyword is used to define a constant in C?

    a)

    final

    b)

    constant

    c)

    #define

    d)

    static

    Ask AI
  7. Q1.7

    What is the index of the first element in an array?

    a)

    1

    b)

    -1

    c)

    0

    d)

    Depends on array

    Ask AI
  8. Q1.8

    Which one is the logical AND operator in C?

    a)

    &

    b)

    |

    c)

    &&

    d)

    ||

    Ask AI
  9. Q1.9

    Which format specifier is used for printing float values?

    a)

    %d

    b)

    %c

    c)

    %f

    d)

    %x

    Ask AI
  10. Q1.10

    Which of these is not a loop in C?

    a)

    for

    b)

    while

    c)

    do-while

    d)

    repeat-until

    Ask AI

Q.2 Solve both questions :

Ask AI
  1. Q2.1

    Explain the structure of a C program with an example.

    Ask AI
  2. Q2.2

    Describe basic data types in C with memory size.

    Ask AI

Q.3 Solve both questions :

Ask AI
  1. Q3.1

    What is an algorithm. Write an algorithm to perform the addition of two numbers in C and draw a flowchart to represent the addition of two numbers.

    Ask AI
  2. Q3.2

    Write a program to check whether a number is even or odd using if-else.

    Ask AI

Q.4 Solve both questions :

Ask AI
  1. Q4.1

    Explain Arithmetic and Logical operators in C with example programs.

    Ask AI
  2. Q4.2

    Explain Relational and Bitwise operators with example programs.

    Ask AI

Q.5 Solve both questions :

Ask AI
  1. Q5.1

    Explain call by value and call by reference with examples.

    Ask AI
  2. Q5.2

    What is the difference between library functions and user-defined functions?

    Ask AI

Q.6 Solve both questions :

Ask AI
  1. Q6.1

    What is an array in C programming? Write advantages of using arrays. Explain a one-dimensional array with a suitable example program.

    Ask AI
  2. Q6.2

    Describe the difference between character array and string.

    Ask AI

Q.7 Solve both questions :

Ask AI
  1. Q7.1

    Write the difference Between Array and Structure in C programming.

    Ask AI
  2. Q7.2

    Write the difference Between Structure and Union in C programming.

    Ask AI

Q.8 Solve both questions :

Ask AI
  1. Q8.1

    What is a pointer? Explain pointer declaration and initialization with sample program.

    Ask AI
  2. Q8.2

    What is file? Explain text file and binary file in details.

    Ask AI

Q.9 Write short notes on any two of the following:

Ask AI
  1. Q9.1

    • Structure
    • Union
    • Recursion
    • Fibonacci series program
    a)

    Structure

    b)

    Union

    c)

    Recursion

    d)

    Fibonacci series program

    Ask AI

2023100104

B.Tech. 1st Semester Examination, 2023

03 Hours70 marks

Instructions

  • The marks are indicated in the right-hand margin.
  • There are NINE questions in this paper.
  • Attempt FIVE questions in all.
  • Question No. 1 is compulsory.

Q.1 Choose the correct answer of the following (Any seven question only):

Ask AI
  1. Q1.a

    What is the output of the following code?

    int x = 10;
    x++;
    printf("%d", x);
    a)

    Error

    b)

    10

    c)

    11

    d)

    9

    Ask AI
  2. Q1.b

    Which function is used to dynamically allocate memory in C?

    a)

    malloc()

    b)

    calloc()

    c)

    realloc()

    d)

    all of the above

    Ask AI
  3. Q1.c

    What is the output of the following code?

    #include <stdio.h>
    int main() {
      char *p = 0;
      *p = 'a';
      printf("%c", *p);
      return 0;
    }
    a)

    It will print 'a'

    b)

    It will print 0

    c)

    Compile time error

    d)

    Runtime error

    Ask AI
  4. Q1.d

    What are the elements present in the array of the following C code?

    int array[6] = { 5 };
    a)

    5, 5, 5, 5, 5, 5

    b)

    5, 0, 0, 0, 0, 0

    c)

    6, 6, 6, 6, 6, 6

    d)

    (garbage), (garbage), (garbage), (garbage), (garbage), 5

    Ask AI
  5. Q1.e

    What will be the output of the following C code?

    void main() {
      int i = 0;
      while (i < 10) {
        i++;
        printf("hi\n");
        while (i < 8) {
          i++;
          printf("hello\n");
        }
      }
    }
    a)

    hi is printed 8 times, hello 7 times and then hi 2 times

    b)

    hi is printed once, hello 7 times

    c)

    hi is printed once, hello 7 times and then hi 2 times

    d)

    None of the above.

    Ask AI
  6. Q1.f

    What does the following declaration mean?

    int (*ptr) [10];
    a)

    ptr is array of pointers to 10 integers.

    b)

    ptr is a pointer to an array of 10 integers.

    c)

    ptr is an array of 10 integers.

    d)

    ptr is a pointer to array of 10 characters.

    Ask AI
  7. Q1.g

    C is ______ type of programming language?

    a)

    Object Oriented

    b)

    Procedural

    c)

    Bit level language

    d)

    Functional

    Ask AI
  8. Q1.h

    Choose the right C statement.

    a)

    int my_age = 10;

    b)

    int my.age = 10;

    c)

    my age = 10;

    d)

    All are correct

    Ask AI
  9. Q1.i

    Consider the following integer 2D array, which is stored in memory with the base address 1400. What would be the address of the element 14? [Assume that an integer value takes 4 bytes of memory space.]

    int a[3][5] = {{1, 2, 3, 4, 5}, {6, 7, 8, 9, 10}, {11, 12, 13, 14, 15}};
    a)

    1440

    b)

    1444

    c)

    1448

    d)

    1452

    Ask AI
  10. Q1.j

    Consider the following declaration of the variables:

    int x, A[5][6], *p = &A[0][0];

    Which of the following is/are the correct expression(s) to access A[3][5] and assign it to x?

    a)

    x = *(p + 23);

    b)

    x = *(p + 28);

    c)

    x = ((A + 5) + 3);

    d)

    x = ((A + 3) + 5);

    Ask AI

Ask AI
  1. Q2.a

    Explain the difference between auto and static type storage variables with suitable example codes.

    Ask AI
  2. Q2.b

    Differentiate between structures and unions in C. Write a C program to detect whether the computer is little endian or big endian using unions.

    Ask AI

Ask AI
  1. Q3.a

    Write an efficient C program to search if the integer 24 is present in the given sorted array or not. If it is present, print the index where it is found.

    Ask AI
  2. Q3.b

    Explain the insertion sort algorithm and its steps using an example. Consider the array: [5, 2, 4, 6, 1, 3].

    Ask AI

Ask AI
  1. Q4.a

    Describe the concept of pointers in C programming language. Explain how pointers work and discuss their importance in programming, particularly in memory management and efficient data manipulation.

    Ask AI
  2. Q4.b

    Write a C program to copy contents of one file to another. While doing so replace all lowercase characters to their equivalent uppercase characters.

    Ask AI

Ask AI
  1. Q5.a

    Write a C Program to find the Euclidean distance between two points P(x, y) and Q(a, b) using structure representation of points P and Q.

    Ask AI
  2. Q5.b

    Differentiate between call-by-value and call-by-reference with suitable examples.

    Ask AI

Ask AI
  1. Q6.a

    Define arrays in C and explain their declaration and usage. Write a C program to reverse the content of an integer array without using auxiliary array.

    Ask AI
  2. Q6.b

    Define implicit and explicit type casting in C. Provide code examples illustrating when each type of casting occurs and their potential side effects.

    Ask AI

Ask AI
  1. Q7.a

    Explain the concept of nested loops. Describe how the break and continue statements alter the flow of control within C loops.

    Ask AI
  2. Q7.b

    Explain the concept of algorithmic complexity and its significance in computer science. Using examples, illustrate how different algorithms exhibit various orders of complexity, such as constant time (O(1)), linear time (O(n)), logarithmic time (O(log n)), quadratic time (O(n^2)), and exponential time (O(2^n)).

    Ask AI

Ask AI
  1. Q8.a

    The first 6 numbers of the Fibonacci series are: 0 1 1 2 3 5. Write a C program using recursion to find and print the Fibonacci series for first n terms.

    Ask AI
  2. Q8.b

    Write a C program using recursion to find factorial of a given number n.

    Ask AI

Ask AI
  1. Q9.a

    Write a C program for the following:

    1. Reverse a string without using strrev().
    2. Concatenate two strings without using strcat().
    Ask AI
  2. Q9.b

    Write a C program to find result matrix after multiplying two given matrices using 2-D arrays. Check the multiplication criteria also while deriving the logic.

    Ask AI

2022100104

B.Tech 1st Semester Exam-2022

03 Hours70 marks

Instructions

  • The marks are indicated in the right-hand margin.
  • There are NINE questions in this paper.
  • Attempt FIVE questions in all.
  • Question No. 1 is compulsory.

Q.1 Choose the correct answer of the following (any seven):

Ask AI
  1. Q1.1

    What does the following declaration mean?
    int *ptr [5];

    a)

    ptr is an array of pointers to 5 integers

    b)

    ptr is an array of 5 integers

    c)

    ptr is a pointer to an array of 5 integers

    d)

    ptr is a pointer to array

    Ask AI
  2. Q1.2

    The function malloc() is declared in which header file.

    a)

    stdio.h

    b)

    stdlib.h

    c)

    conio.h

    d)

    iostream.h

    Ask AI
  3. Q1.3

    What is the output of:
    #include<stdio.h>
    int main()
    {
      char ch = 'Z';
      printf("%d ", ch);
      return 0;
    }

    a)

    65

    b)

    90

    c)

    97

    d)

    122

    Ask AI
  4. Q1.4

    How is an array initialized in C language?

    a)

    int a[3] = {1, 2, 3};

    b)

    int a = {1, 2, 3};

    c)

    int a [ ] = new int[3];

    d)

    int a(3) = {1, 2, 3};

    Ask AI
  5. Q1.5

    What is the return type of the fopen() function in C?

    a)

    Pointer to a FILE object.

    b)

    Pointer to an integer.

    c)

    An integer.

    d)

    None of the above.

    Ask AI
  6. Q1.6

    What will be the output of the following C Code?
    #include<stdio.h>
    int main()
    {
      int x=4, y, z;
      y=--x;
      z=x--;
      printf("%d%d%d", x, y, z);
    }

    a)

    3 2 3

    b)

    2 2 3

    c)

    3 2 2

    d)

    2 3 3

    Ask AI
  7. Q1.7

    The keyword used to transfer control from a function back to the calling function is.

    a)

    switch

    b)

    return

    c)

    continue

    d)

    go to

    Ask AI
  8. Q1.8

    What is the output of:
    #include <stdio.h>
    int main( )
    {
      float a = 5, b = 2;
      int c,d;
      c = a/b;
      d = c/2;
      printf("%d", d);
      return 0;
    }

    a)

    1

    b)

    0

    c)

    1.5

    d)

    1.25

    Ask AI
  9. Q1.9

    In C, if you pass an array as an argument to a function, what actually gets passed?

    a)

    First element of the array

    b)

    Value of elements of the array

    c)

    Base address of the array

    d)

    Address of the last element of array

    Ask AI
  10. Q1.10

    How is the $3^{rd}$ element in an array accessed based on pointer notation?

    a)

    *a+3

    b)

    *(a+3)

    c)

    *(*a+3)

    d)

    &(a+3)

    Ask AI

Q.2 Solve both questions :

Ask AI
  1. Q2.1

    Explain entry controlled loop and exit controlled loop with flow charts and examples.

    Ask AI
  2. Q2.2

    Write a C program to reverse a given multi-digit number.

    Ask AI

Q.3 Solve both questions :

Ask AI
  1. Q3.1

    Explain break and continue keywords with suitable examples in context of managing loops.

    Ask AI
  2. Q3.2

    What is storage classes in C. Write features (storage, default value, scope, life) of variables defined under each storage class.

    Ask AI

Q.4 Solve both questions :

Ask AI
  1. Q4.1

    Write a C function for Bubble sort. Analyse the time complexity of Bubble sort for each standard cases.

    Ask AI
  2. Q4.2

    Differentiate between formal argument and actual argument with an example.

    Ask AI

Q.5 Solve both questions :

Ask AI
  1. Q5.1

    What is recursion? Write a recursive C program to generate $n^{th}$ term of the Fibonacci series.

    Ask AI
  2. Q5.2

    How string is declared and initialized? Explain any four predefined string manipulation functions with examples.

    Ask AI

Q.6 Solve both questions :

Ask AI
  1. Q6.1

    Write a C program to find result matrix after multiplying two given matrices using 2-D arrays.

    Ask AI
  2. Q6.2

    Write a program to copy contents of one file to another. While doing so replace all lowercase characters to their equivalent uppercase characters.

    Ask AI

Q.7 Solve both questions :

Ask AI
  1. Q7.1

    Write the difference between structure and union. Compare them with the help of an example.

    Ask AI
  2. Q7.2

    Write a program to copy the contents of one array into another in reverse order.

    Ask AI

Q.8 Solve both questions :

Ask AI
  1. Q8.1

    Differentiate between call-by-value and call-by-reference with suitable examples.

    Ask AI
  2. Q8.2

    Discuss conditional operator? Write a C program to find largest of three numbers using conditional operator?

    Ask AI

Q.9 Solve both questions :

Ask AI
  1. Q9.1

    Write a C program that converts a string like "124" to an integer 124.

    Ask AI
  2. Q9.2

    Write a C program using the nesting of loops to print the following pattern:
          1
        2  3
      4  5  6
    7  8  9  10

    Ask AI

2022V4100104

B.Tech 1st Semester Exam-2022

03 Hours70 marks

Instructions

  • The marks are indicated in the right-hand margin.
  • There are NINE questions in this paper.
  • Attempt FIVE questions in all.
  • Question No. 1 is compulsory.

Q.1 Choose the correct answer of the following (any seven):

Ask AI
  1. Q1.1

    What does the following declaration mean?
    int *ptr [5];

    a)

    ptr is an array of pointers to 5 integers

    b)

    ptr is an array of 5 integers

    c)

    ptr is a pointer to an array of 5 integers

    d)

    ptr is a pointer to array

    Ask AI
  2. Q1.2

    The function malloc() is declared in which header file.

    a)

    stdio.h

    b)

    stdlib.h

    c)

    conio.h

    d)

    iostream.h

    Ask AI
  3. Q1.3

    What is the output of:
    #include<stdio.h>
    int main()
    {
      char ch = 'Z';
      printf("%d ", ch);
      return 0;
    }

    a)

    65

    b)

    90

    c)

    97

    d)

    122

    Ask AI
  4. Q1.4

    How is an array initialized in C language?

    a)

    int a[3] = {1, 2, 3};

    b)

    int a = {1, 2, 3};

    c)

    int a [ ] = new int[3];

    d)

    int a(3) = {1, 2, 3};

    Ask AI
  5. Q1.5

    What is the return type of the fopen() function in C?

    a)

    Pointer to a FILE object.

    b)

    Pointer to an integer.

    c)

    An integer.

    d)

    None of the above.

    Ask AI
  6. Q1.6

    What will be the output of the following C Code?
    #include<stdio.h>
    int main()
    {
      int x=4, y, z;
      y=--x;
      z=x--;
      printf("%d%d%d", x, y, z);
    }

    a)

    3 2 3

    b)

    2 2 3

    c)

    3 2 2

    d)

    2 3 3

    Ask AI
  7. Q1.7

    The keyword used to transfer control from a function back to the calling function is.

    a)

    switch

    b)

    return

    c)

    continue

    d)

    go to

    Ask AI
  8. Q1.8

    What is the output of:
    #include <stdio.h>
    int main( )
    {
      float a = 5, b = 2;
      int c,d;
      c = a/b;
      d = c/2;
      printf("%d", d);
      return 0;
    }

    a)

    1

    b)

    0

    c)

    1.5

    d)

    1.25

    Ask AI
  9. Q1.9

    In C, if you pass an array as an argument to a function, what actually gets passed?

    a)

    First element of the array

    b)

    Value of elements of the array

    c)

    Base address of the array

    d)

    Address of the last element of array

    Ask AI
  10. Q1.10

    How is the $3^{rd}$ element in an array accessed based on pointer notation?

    a)

    *a+3

    b)

    *(a+3)

    c)

    *(*a+3)

    d)

    &(a+3)

    Ask AI

Q.2 Solve both questions :

Ask AI
  1. Q2.1

    Explain entry controlled loop and exit controlled loop with flow charts and examples.

    Ask AI
  2. Q2.2

    Write a C program to reverse a given multi-digit number.

    Ask AI

Q.3 Solve both questions :

Ask AI
  1. Q3.1

    Explain break and continue keywords with suitable examples in context of managing loops.

    Ask AI
  2. Q3.2

    What is storage classes in C. Write features (storage, default value, scope, life) of variables defined under each storage class.

    Ask AI

Q.4 Solve both questions :

Ask AI
  1. Q4.1

    Write a C function for Bubble sort. Analyse the time complexity of Bubble sort for each standard cases.

    Ask AI
  2. Q4.2

    Differentiate between formal argument and actual argument with an example.

    Ask AI

Q.5 Solve both questions :

Ask AI
  1. Q5.1

    What is recursion? Write a recursive C program to generate $n^{th}$ term of the Fibonacci series.

    Ask AI
  2. Q5.2

    How string is declared and initialized? Explain any four predefined string manipulation functions with examples.

    Ask AI

Q.6 Solve both questions :

Ask AI
  1. Q6.1

    Write a C program to find result matrix after multiplying two given matrices using 2-D arrays.

    Ask AI
  2. Q6.2

    Write a program to copy contents of one file to another. While doing so replace all lowercase characters to their equivalent uppercase characters.

    Ask AI

Q.7 Solve both questions :

Ask AI
  1. Q7.1

    Write the difference between structure and union. Compare them with the help of an example.

    Ask AI
  2. Q7.2

    Write a program to copy the contents of one array into another in reverse order.

    Ask AI

Q.8 Solve both questions :

Ask AI
  1. Q8.1

    Differentiate between call-by-value and call-by-reference with suitable examples.

    Ask AI
  2. Q8.2

    Discuss conditional operator? Write a C program to find largest of three numbers using conditional operator?

    Ask AI

Q.9 Solve both questions :

Ask AI
  1. Q9.1

    Write a C program that converts a string like "124" to an integer 124.

    Ask AI
  2. Q9.2

    Write a C program using the nesting of loops to print the following pattern:
          1
        2  3
      4  5  6
    7  8  9  10

    Ask AI

2021100204

B.Tech 2nd Semester Exam., 2021

3 hours70 marks

Instructions

  • The marks are indicated in the right-hand margin.
  • There are NINE questions in this paper.
  • Attempt FIVE questions in all.
  • Question No. 1 is compulsory.

  1. Choose the correct option (any seven) :

Ask AI
  1. Q1.a

    What will be the output of this C code?

    #include<stdio.h>
    int main()
    {
        char ch = 'A';
        printf("%d", sizeof('A'));
        return 0;
    }
    a)

    1

    b)

    2

    c)

    3

    d)

    4

    Ask AI
  2. Q1.b

    What will be the output of this C code?

    #include<stdio.h>
    int main()
    {
        extern int i;
        i = 20;
        printf("%d", i);
        return 0;
    }
    a)

    20

    b)

    4

    c)

    Undefined reference to I

    d)

    Linking error

    Ask AI
  3. Q1.c

    What will be the output of this C code?

    #include<stdio.h>
    int main()
    {
        int i = 100;
        {
            int i = 0;
            printf("%d", i==0);
        }
        return 0;
    }
    a)

    10

    b)

    0

    c)

    Garbage value

    d)

    1

    Ask AI
  4. Q1.d

    What will be the output of this C code?

    #include<stdio.h>
    int main(){
        int x=3, y=4, z;
        z = ++x * y++;
        printf("%d", z);
    }
    a)

    12

    b)

    16

    c)

    18

    d)

    20

    Ask AI
  5. Q1.e

    In C, if you pass an array as an argument to a function, what actually gets passed?

    a)

    Value of elements in array

    b)

    First element of the array

    c)

    Base address of the array

    d)

    Address of the last element of array

    Ask AI
  6. Q1.f

    The keyword used to transfer control from a function back to the calling function is

    a)

    switch

    b)

    goto

    c)

    go back

    d)

    return

    Ask AI
  7. Q1.g

    What will be the output of this C code?

    #include<stdio.h>
    int main()
    {
        int y=200;
        const int x=y;
        x=10;
        printf("%d\n", x);
        return 0;
    }
    a)

    200

    b)

    Garbage value

    c)

    Error

    d)

    10

    Ask AI
  8. Q1.h

    Which of the following are unary operators in C?

    1. !
    2. sizeof
    3. ~
    4. &&
    a)

    1, 2

    b)

    1, 3

    c)

    2, 4

    d)

    1, 2 and 3

    Ask AI
  9. Q1.i

    How will you free the allocated memory?

    a)

    remove(var-name);

    b)

    free(var-name);

    c)

    delete(var-name);

    d)

    alloc(var-name);

    Ask AI
  10. Q1.j

    Which statement will you add in the following program to work it correctly?

    #include<stdio.h>
    int main()
    {
        printf("%f", log(128.0));
        return 0;
    }
    a)

    #include<conio.h>

    b)

    #include<math.h>

    c)

    #include<stdlib.h>

    d)

    #include<maths.h>

    Ask AI

Ask AI
  1. Q2.a

    Write a program to print all prime numbers from 1 to 100.

    Ask AI
  2. Q2.b

    It is syntactically valid to use float variable as loop control variable but it is not recommended. Justify your answer regarding this statement.

    Ask AI

Ask AI
  1. Q3.a

    Write a program to generate all combinations of 1, 2 and 3 using for loop.

    Ask AI
  2. Q3.b

    Define data types in C. Discuss primitive data types in terms of memory occupied, format specifier and range.

    Ask AI

Ask AI
  1. Q4.1

    Define calling and called functions with suitable examples. What do you mean by call-by-value and call-by-reference? Write C programs for swapping of two numbers using call-by-value and call-by-reference techniques.

    Ask AI

Ask AI
  1. Q5.a

    Explain various types of arithmetic and logical operators in C language with the help of example. When precedence of two operators in an arithmetic expression is same, how associativity helps in identifying which operator will be evaluated first? Illustrate it with example.

    Ask AI
  2. Q5.b

    Suppose that hundred numbers are entered from the keyboard into an array. The number to be searched is entered through the keyboard by the user. Write a program to find if the number to be searched is present in the array and if it is present, display the number of times it appears in the array.

    Ask AI

Ask AI
  1. Q6.a

    What is case control structure in C? What is the reason for using break statement at the end of each case in case control block?

    Ask AI
  2. Q6.b

    Explain pointer arithmetic with the help of suitable examples.

    Ask AI

Ask AI
  1. Q7.a

    Any year is entered through the keyboard. Write a C program to determine whether the year is a leap year or not.

    Ask AI
  2. Q7.b

    Explain string palindrome. Write a program in C to check whether a given string is palindrome or not.

    Ask AI

Ask AI
  1. Q8.a

    Write a C program using the nesting of loops to print the following pattern :

        *
       * *
      * * *
     * * * *
    * * * * *
    Ask AI
  2. Q8.b

    Define storage classes with its type in detail.

    Ask AI

Ask AI
  1. Q9.a

    What is recursive function? Further, for given integer n, write a program in C to find the sum of the following series using recursion :

    $ S = 1 + 2 + 3 + \dots + n $

    Ask AI
  2. Q9.b

    Define structure and union in C with suitable examples.

    Ask AI

2020100104

B.Tech 2nd Semester Special Exam., 2020

3 hours70 marks

Instructions

  • The marks are indicated in the right-hand margin.
  • There are NINE questions in this paper.
  • Attempt FIVE questions in all.
  • Question No. 1 is compulsory.

  1. Choose the correct alternative (any seven) :

Ask AI
  1. Q1.a

    A variable name in C should be a/an

    a)

    reserve word

    b)

    keyword

    c)

    identifier

    d)

    All of the above

    Ask AI
  2. Q1.b

    Why do we write (int*) before malloc?

    int *p = (int*) malloc(sizeof(int));

    a)

    It is for the syntax correctness

    b)

    It is for the type casting

    c)

    It is to inform malloc() function about data-type expected

    d)

    None of the above

    Ask AI
  3. Q1.c

    Which header file is used for reading and writing to a file?

    a)

    #include<iostream.h>

    b)

    #include<fstream.h>

    c)

    #include<file.h>

    d)

    All of the above

    Ask AI
  4. Q1.d

    Which of the following functions displays the keyboard character for pressed key?

    a)

    getch()

    b)

    getche()

    c)

    Both (i) and (ii)

    d)

    None of the above

    Ask AI
  5. Q1.e

    What does the following declaration mean?

    int (*ptr) [10];

    a)

    ptr is array of pointers to 10 integers

    b)

    ptr is a pointer to an array of 10 integers

    c)

    ptr is an array of 10 integers

    d)

    ptr is a pointer to array

    Ask AI
  6. Q1.f

    Automatic variables are initialized to

    a)

    zero

    b)

    junk value

    c)

    None of the above

    d)

    Both of the above

    Ask AI
  7. Q1.g

    Which of the following symbols is the type-specifier?

    a)

    &

    b)
    c)

    d)

    %

    Ask AI
  8. Q1.h

    The && and || operators

    a)

    compare two numeric values

    b)

    compare two numeric values short-hand operators

    c)

    compare two Boolean values

    d)

    None of the above

    Ask AI
  9. Q1.i

    Identify the correct sequence of steps to run a program.

    a)

    Link, load, code, compile and execute

    b)

    Code, compile, link, execute and load

    c)

    Code, compile, link, load and execute

    d)

    Compile, code, link, load and execute

    Ask AI
  10. Q1.j

    An external variable is the one

    a)

    which resides in the memory till the end of the program

    b)

    which is globally accessible by all the functions

    c)

    which is declared outside the body of the function

    d)

    All of the above

    Ask AI

Ask AI
  1. Q2.a

    Discuss about some methods or methodologies used for problem solving.

    Ask AI
  2. Q2.b

    How programming utilizes different components of computer system?

    Ask AI
  3. Q2.c

    What is algorithm? Give an example algorithm for any problem.

    Ask AI

Ask AI
  1. Q3.a

    What is the difference between compilation and execution of a program?

    Ask AI
  2. Q3.b

    What is the effect of warning and syntax error on program execution? What we get as an output of compilation step?

    Ask AI
  3. Q3.c

    What are variables? List the 'data types' which can be associated to a variable in C language.

    Ask AI

Ask AI
  1. Q4.a

    What is the role of 'header files' in C language? List any four with their usage.

    Ask AI
  2. Q4.b

    Draw a flowchart to find the average of 10 numbers of an array.

    Ask AI
  3. Q4.c

    Write the syntax for conditional operator in C. Also write the syntax for some conditional statements used in C.

    Ask AI

Ask AI
  1. Q5.a

    List the looping constructs used in C. What are the roles of 'break' and 'continue' statements in loops? Show with examples.

    Ask AI
  2. Q5.b

    Given a list of 11 numbers. Write a C program to find the median of that list.

    Ask AI

Ask AI
  1. Q6.a

    What are functions? How are they useful? Comment on two categories in which various functions can be categorized.

    Ask AI
  2. Q6.b

    Write a C program to generate Fibonacci series using function.

    Ask AI
  3. Q6.c

    List three different ways to read a string from the prompt.

    Ask AI

Ask AI
  1. Q7.a

    What are the ways of parameter passing in functions? Explain each.

    Ask AI
  2. Q7.b

    Write a C program to find the largest number from an array using pointer.

    Ask AI
  3. Q7.c

    What are the structures in C? How are they different from Union?

    Ask AI

Ask AI
  1. Q8.a

    What is dynamic memory allocation? How is this achieved in C? Explain.

    Ask AI
  2. Q8.b

    Write a C program to copy the content of one file into other.

    Ask AI
  3. Q8.c

    How is merge sort different from other sorting algorithms?

    Ask AI

Ask AI
  1. Q9.a

    Write a C program to create an array of structures named "STUDENT" with fields Name, Roll No, Address and Marks. Also add the code for inserting, deleting and printing any student record.

    Ask AI
  2. Q9.b

    What do you mean by command line argument? Give an example.

    Ask AI

2019100104

B.Tech 1st Semester Exam., 2019 (New Course)

3 hours70 marks

Instructions

  • All questions carry equal marks.
  • There are NINE questions in this paper.
  • Attempt FIVE questions in all.
  • Question No. 1 is compulsory.

Q.1 Choose the correct answer from any seven of the following:

Ask AI
  1. Q1.1

    Let x be an integer which can take a value of 0 or 1. The statement if (x == 0)x = 1; else x = 0; is equivalent to which one of the following?

    a)

    x = 1 - x

    b)

    x = x + 1

    c)

    x = x * 1

    d)

    x = 1% x

    Ask AI
  2. Q1.2

    A program attempts to generate as many permutations as possible of the string, 'abcd' by pushing the characters a, b, c, d in the same order onto a stack, but it may pop off the top character at any time. Which one of the following strings cannot be generated using this program?

    a)

    abcd

    b)

    dcba

    c)

    cabd

    d)

    cbad

    Ask AI
  3. Q1.3

    Suppose a C program has floating constant 1.414, what is the best way to convert this 'float' data type?

    a)

    (float)1.414

    b)

    Float (1.414)

    c)

    1.414f or 1.414F

    d)

    1.414 itself of 'float' data type, i.e., nothing else required

    Ask AI
  4. Q1.4

    What is the output of the following program?
    void main(){
      int a;
      a=1;
      while(a<=1)
        if(a%2)
          printf("%d", a++);
        else
          printf("%d", ++a);
      printf("%d", a+10);
    }

    a)

    011

    b)

    012

    c)

    111

    d)

    112

    Ask AI
  5. Q1.5

    What is the output of this C code?
    #include<stdio.h>
    void main()
    {
      int a = 5 * 3 + 2 - 4;
      printf("%d", a);
    }

    a)

    13

    b)

    14

    c)

    12

    d)

    16

    Ask AI
  6. Q1.6

    What is the output of this C code?
    #include<stdio.h>
    void main()
    {
      int b = 6;
      int c = 7;
      int a = ++b+c--;
      printf("%d", a);
    }

    a)

    Run-time error

    b)

    15

    c)

    13

    d)

    14

    Ask AI
  7. Q1.7

    What is the output of this C code?
    #include<stdio.h>
    void foo(int*);
    int main()
    {
      int i = 10;
      foo((&i)++);
    }
    void foo(int* p)
    {
      printf("%d ", *p);
    }

    a)

    10

    b)

    some garbage value

    c)

    compile-time error

    d)

    segmentation fault/code crash

    Ask AI
  8. Q1.8

    User-defined data type can be derived by

    a)

    struct

    b)

    enum

    c)

    typedef

    d)

    All of the above

    Ask AI
  9. Q1.9

    As per C language standard, which of the following is/are not keyword(s)? Pick the best statement:
    auto, make, main, sizeof, elseif

    a)

    make, main

    b)

    sizeof

    c)

    auto, make

    d)

    make, main, elseif

    Ask AI
  10. Q1.10

    What is the output of this C code (when 1 is entered)?
    #include<stdio.h>
    void main()
    {
      double ch;
      printf ("enter a value between 1 to 2:");
      scanf("%lf", &ch);
      switch (ch)
      {
        case 1:
          printf("1");
          break;
        case 2:
          printf("2");
          break;
      }
    }

    a)

    Compile-time error

    b)

    1

    c)

    2

    d)

    None of the above

    Ask AI

Q.2 Solve this question :

Ask AI
  1. Q2.1

    What do you mean by pre-processor? Also explain the use of %i format specifier w.r.t, scanf() function.

    Ask AI

Q.3 Solve this question :

Ask AI
  1. Q3.1

    Write a C program to Perform binary search on a set of given sorted numbers.

    Ask AI

Q.4 Solve this question :

Ask AI
  1. Q4.1

    Write a C program to find the number of lines in a text file.

    Ask AI

Q.5 Solve this question :

Ask AI
  1. Q5.1

    Explain pointer arithmetic with the help of suitable diagrams.

    Ask AI

Q.6 Solve this question :

Ask AI
  1. Q6.1

    Explain the following bitwise operators:
    (a) Bitwise AND
    (b) Bitwise OR
    (c) Bitwise XOR
    (d) Bitwise Left Shift

    Ask AI

Q.7 Solve this question :

Ask AI
  1. Q7.1

    What do you mean by 'call by reference'? Explain with the help of a function which swaps two numbers.

    Ask AI

Q.8 Solve this question :

Ask AI
  1. Q8.1

    Write a C program of the following:
    (a) Reverse a string without using strrev().
    (b) Concatenate two strings without using strcat()

    Ask AI

Q.9 Solve this question :

Ask AI
  1. Q9.1

    Write a 'recursive' C program to print the following:
    (a) GCD of two numbers
    (b) Merge-sort of a set of given numbers

    Ask AI

2019V4100104

B.Tech 1st Semester Exam., 2019 (New Course)

3 hours70 marks

Instructions

  • All questions carry equal marks.
  • There are NINE questions in this paper.
  • Attempt FIVE questions in all.
  • Question No. 1 is compulsory.

Q.1 Choose the correct answer from any seven of the following:

Ask AI
  1. Q1.1

    Let x be an integer which can take a value of 0 or 1. The statement if (x == 0)x = 1; else x = 0; is equivalent to which one of the following?

    a)

    x = 1 - x

    b)

    x = x + 1

    c)

    x = x * 1

    d)

    x = 1% x

    Ask AI
  2. Q1.2

    A program attempts to generate as many permutations as possible of the string, 'abcd' by pushing the characters a, b, c, d in the same order onto a stack, but it may pop off the top character at any time. Which one of the following strings cannot be generated using this program?

    a)

    abcd

    b)

    dcba

    c)

    cabd

    d)

    cbad

    Ask AI
  3. Q1.3

    Suppose a C program has floating constant 1.414, what is the best way to convert this 'float' data type?

    a)

    (float)1.414

    b)

    Float (1.414)

    c)

    1.414f or 1.414F

    d)

    1.414 itself of 'float' data type, i.e., nothing else required

    Ask AI
  4. Q1.4

    What is the output of the following program?
    void main(){
      int a;
      a=1;
      while(a<=1)
        if(a%2)
          printf("%d", a++);
        else
          printf("%d", ++a);
      printf("%d", a+10);
    }

    a)

    011

    b)

    012

    c)

    111

    d)

    112

    Ask AI
  5. Q1.5

    What is the output of this C code?
    #include<stdio.h>
    void main()
    {
      int a = 5 * 3 + 2 - 4;
      printf("%d", a);
    }

    a)

    13

    b)

    14

    c)

    12

    d)

    16

    Ask AI
  6. Q1.6

    What is the output of this C code?
    #include<stdio.h>
    void main()
    {
      int b = 6;
      int c = 7;
      int a = ++b+c--;
      printf("%d", a);
    }

    a)

    Run-time error

    b)

    15

    c)

    13

    d)

    14

    Ask AI
  7. Q1.7

    What is the output of this C code?
    #include<stdio.h>
    void foo(int*);
    int main()
    {
      int i = 10;
      foo((&i)++);
    }
    void foo(int* p)
    {
      printf("%d ", *p);
    }

    a)

    10

    b)

    some garbage value

    c)

    compile-time error

    d)

    segmentation fault/code crash

    Ask AI
  8. Q1.8

    User-defined data type can be derived by

    a)

    struct

    b)

    enum

    c)

    typedef

    d)

    All of the above

    Ask AI
  9. Q1.9

    As per C language standard, which of the following is/are not keyword(s)? Pick the best statement:
    auto, make, main, sizeof, elseif

    a)

    make, main

    b)

    sizeof

    c)

    auto, make

    d)

    make, main, elseif

    Ask AI
  10. Q1.10

    What is the output of this C code (when 1 is entered)?
    #include<stdio.h>
    void main()
    {
      double ch;
      printf ("enter a value between 1 to 2:");
      scanf("%lf", &ch);
      switch (ch)
      {
        case 1:
          printf("1");
          break;
        case 2:
          printf("2");
          break;
      }
    }

    a)

    Compile-time error

    b)

    1

    c)

    2

    d)

    None of the above

    Ask AI

Q.2 Solve this question :

Ask AI
  1. Q2.1

    What do you mean by pre-processor? Also explain the use of %i format specifier w.r.t, scanf() function.

    Ask AI

Q.3 Solve this question :

Ask AI
  1. Q3.1

    Write a C program to Perform binary search on a set of given sorted numbers.

    Ask AI

Q.4 Solve this question :

Ask AI
  1. Q4.1

    Write a C program to find the number of lines in a text file.

    Ask AI

Q.5 Solve this question :

Ask AI
  1. Q5.1

    Explain pointer arithmetic with the help of suitable diagrams.

    Ask AI

Q.6 Solve this question :

Ask AI
  1. Q6.1

    Explain the following bitwise operators:
    (a) Bitwise AND
    (b) Bitwise OR
    (c) Bitwise XOR
    (d) Bitwise Left Shift

    Ask AI

Q.7 Solve this question :

Ask AI
  1. Q7.1

    What do you mean by 'call by reference'? Explain with the help of a function which swaps two numbers.

    Ask AI

Q.8 Solve this question :

Ask AI
  1. Q8.1

    Write a C program of the following:
    (a) Reverse a string without using strrev().
    (b) Concatenate two strings without using strcat()

    Ask AI

Q.9 Solve this question :

Ask AI
  1. Q9.1

    Write a 'recursive' C program to print the following:
    (a) GCD of two numbers
    (b) Merge-sort of a set of given numbers

    Ask AI

2019100204

B.Tech 2nd Semester Exam., 2019 (New Course)

3 hours70 marks

Instructions

  • The marks are indicated in the right-hand margin.
  • There are NINE questions in this paper.
  • Attempt FIVE questions in all.
  • Question No. 1 is compulsory.

Q.1 Choose the correct alternative (any seven):

Ask AI
  1. Q1.1

    What will be the data type of result of the following operation?
    (float)a * (int)b/(long)c * (double)d)

    a)

    int

    b)

    long

    c)

    float

    d)

    double

    Ask AI
  2. Q1.2

    What does the following declaration mean?
    int (*ptr) [10];

    a)

    ptr is array of pointers to 10 integers

    b)

    ptr is a pointer to an array of 10 integers

    c)

    ptr is an array of 10 integers

    d)

    ptr is a pointer to array

    Ask AI
  3. Q1.3

    Which of the following is a correct format for declaration of function?

    a)

    return-type function-name (argument type);

    b)

    return-type function-name (argument type) {}

    c)

    return-type (argument type) function-name;

    d)

    All of the above

    Ask AI
  4. Q1.4

    The value obtained in the function is given back to main by using ______ keyword.

    a)

    return

    b)

    static

    c)

    new

    d)

    volatile

    Ask AI
  5. Q1.5

    Which data type is most suitable for storing a number 65000 in a 32-bit system?

    a)

    signed short

    b)

    unsigned short

    c)

    long

    d)

    int

    Ask AI
  6. Q1.6

    Which of the following declarations is not supported by C?

    a)

    String str;

    b)

    Char *str;

    c)

    Float str = 3e2;

    d)

    None of the above

    Ask AI
  7. Q1.7

    Which of the following is an invalid if-else statement?

    a)

    if (if (i == 1)) {}

    b)

    if (func1 (a)) {}

    c)

    if (a) {}

    d)

    if ((char) a) {}

    Ask AI
  8. Q1.8

    A local variable declaration with no storage class specified is by default

    a)

    auto

    b)

    extern

    c)

    static

    d)

    register

    Ask AI
  9. Q1.9

    Automatic variables are initialized to

    a)

    zero

    b)

    junk value

    c)

    None of the above

    d)

    Both (i) and (ii)

    Ask AI
  10. Q1.10

    The getchar() function is defined in ______ header file.

    a)

    conio.h

    b)

    stdio.h

    c)

    iostream.h

    d)

    None of the above

    Ask AI

Q.2 Solve all parts :

Ask AI
  1. Q2.1

    What do you understand by the term 'problem solving'? How can programming be used to do problem solving?

    Ask AI
  2. Q2.2

    Discuss about the components of computer system. How are they involved in computer programming activity?

    Ask AI
  3. Q2.3

    Write the algorithm for exchanging the values of two variables.

    Ask AI

Q.3 Solve all parts :

Ask AI
  1. Q3.1

    Differentiate between flowchart, pseudo-code and source code.

    Ask AI
  2. Q3.2

    What are the outcomes of compilation of a program? Discuss in detail.

    Ask AI
  3. Q3.3

    What are constants? List the types of constants as defined in C language.

    Ask AI

Q.4 Solve all parts :

Ask AI
  1. Q4.1

    What are the libraries? How are they different from header files?

    Ask AI
  2. Q4.2

    What is an array? Write a C program to find the average of 10 numbers of an array.

    Ask AI
  3. Q4.3

    What do you understand by the operator precedence? Explain.

    Ask AI

Q.5 Solve both questions :

Ask AI
  1. Q5.1

    Define storage classes of C with some appropriate examples.

    Ask AI
  2. Q5.2

    What is branching? What are the possible types of branching and the C statements used for such type of branching? Give a detailed explanation with example.

    Ask AI

Q.6 Solve both questions :

Ask AI
  1. Q6.1

    Write a C program to calculate 12!/8. The operation is factorial of 12, divided by 8. Also comment by examine whether the algorithm used is efficient.

    Ask AI
  2. Q6.2

    What is type casting? Explain its classification through examples.

    Ask AI

Q.7 Solve all parts :

Ask AI
  1. Q7.1

    Give the purpose, proper syntax and other variants of 'getch()' and 'gets()' functions.

    Ask AI
  2. Q7.2

    How can an array of numbers be passed to function as parameter? Write an example C program in support.

    Ask AI
  3. Q7.3

    What is dynamic memory allocation in C?

    Ask AI

Q.8 Solve both questions :

Ask AI
  1. Q8.1

    Differentiate between the following:
    (i) Structures and Union
    (ii) Formatted and Unformatted data files

    Ask AI
  2. Q8.2

    What is a file? List different operations performed on file. How are they achieved? Explain.

    Ask AI

Q.9 Solve all parts :

Ask AI
  1. Q9.1

    Write a C program to create an array of structures named "STUDENT" with fields, Name, Cell no, Address, and Marks. How to show any student record using this structure?

    Ask AI
  2. Q9.2

    Which of the sorting algorithm is better than other and why? Explain.

    Ask AI
  3. Q9.3

    Write C program for merge sort algorithm.

    Ask AI

2019V4100204

B.Tech 2nd Semester Exam., 2019 (New Course)

3 hours70 marks

Instructions

  • The marks are indicated in the right-hand margin.
  • There are NINE questions in this paper.
  • Attempt FIVE questions in all.
  • Question No. 1 is compulsory.

Q.1 Choose the correct alternative (any seven):

Ask AI
  1. Q1.1

    What will be the data type of result of the following operation?
    (float)a * (int)b/(long)c * (double)d)

    a)

    int

    b)

    long

    c)

    float

    d)

    double

    Ask AI
  2. Q1.2

    What does the following declaration mean?
    int (*ptr) [10];

    a)

    ptr is array of pointers to 10 integers

    b)

    ptr is a pointer to an array of 10 integers

    c)

    ptr is an array of 10 integers

    d)

    ptr is a pointer to array

    Ask AI
  3. Q1.3

    Which of the following is a correct format for declaration of function?

    a)

    return-type function-name (argument type);

    b)

    return-type function-name (argument type) {}

    c)

    return-type (argument type) function-name;

    d)

    All of the above

    Ask AI
  4. Q1.4

    The value obtained in the function is given back to main by using ______ keyword.

    a)

    return

    b)

    static

    c)

    new

    d)

    volatile

    Ask AI
  5. Q1.5

    Which data type is most suitable for storing a number 65000 in a 32-bit system?

    a)

    signed short

    b)

    unsigned short

    c)

    long

    d)

    int

    Ask AI
  6. Q1.6

    Which of the following declarations is not supported by C?

    a)

    String str;

    b)

    Char *str;

    c)

    Float str = 3e2;

    d)

    None of the above

    Ask AI
  7. Q1.7

    Which of the following is an invalid if-else statement?

    a)

    if (if (i == 1)) {}

    b)

    if (func1 (a)) {}

    c)

    if (a) {}

    d)

    if ((char) a) {}

    Ask AI
  8. Q1.8

    A local variable declaration with no storage class specified is by default

    a)

    auto

    b)

    extern

    c)

    static

    d)

    register

    Ask AI
  9. Q1.9

    Automatic variables are initialized to

    a)

    zero

    b)

    junk value

    c)

    None of the above

    d)

    Both (i) and (ii)

    Ask AI
  10. Q1.10

    The getchar() function is defined in ______ header file.

    a)

    conio.h

    b)

    stdio.h

    c)

    iostream.h

    d)

    None of the above

    Ask AI

Q.2 Solve all parts :

Ask AI
  1. Q2.1

    What do you understand by the term 'problem solving'? How can programming be used to do problem solving?

    Ask AI
  2. Q2.2

    Discuss about the components of computer system. How are they involved in computer programming activity?

    Ask AI
  3. Q2.3

    Write the algorithm for exchanging the values of two variables.

    Ask AI

Q.3 Solve all parts :

Ask AI
  1. Q3.1

    Differentiate between flowchart, pseudo-code and source code.

    Ask AI
  2. Q3.2

    What are the outcomes of compilation of a program? Discuss in detail.

    Ask AI
  3. Q3.3

    What are constants? List the types of constants as defined in C language.

    Ask AI

Q.4 Solve all parts :

Ask AI
  1. Q4.1

    What are the libraries? How are they different from header files?

    Ask AI
  2. Q4.2

    What is an array? Write a C program to find the average of 10 numbers of an array.

    Ask AI
  3. Q4.3

    What do you understand by the operator precedence? Explain.

    Ask AI

Q.5 Solve both questions :

Ask AI
  1. Q5.1

    Define storage classes of C with some appropriate examples.

    Ask AI
  2. Q5.2

    What is branching? What are the possible types of branching and the C statements used for such type of branching? Give a detailed explanation with example.

    Ask AI

Q.6 Solve both questions :

Ask AI
  1. Q6.1

    Write a C program to calculate 12!/8. The operation is factorial of 12, divided by 8. Also comment by examine whether the algorithm used is efficient.

    Ask AI
  2. Q6.2

    What is type casting? Explain its classification through examples.

    Ask AI

Q.7 Solve all parts :

Ask AI
  1. Q7.1

    Give the purpose, proper syntax and other variants of 'getch()' and 'gets()' functions.

    Ask AI
  2. Q7.2

    How can an array of numbers be passed to function as parameter? Write an example C program in support.

    Ask AI
  3. Q7.3

    What is dynamic memory allocation in C?

    Ask AI

Q.8 Solve both questions :

Ask AI
  1. Q8.1

    Differentiate between the following:
    (i) Structures and Union
    (ii) Formatted and Unformatted data files

    Ask AI
  2. Q8.2

    What is a file? List different operations performed on file. How are they achieved? Explain.

    Ask AI

Q.9 Solve all parts :

Ask AI
  1. Q9.1

    Write a C program to create an array of structures named "STUDENT" with fields, Name, Cell no, Address, and Marks. How to show any student record using this structure?

    Ask AI
  2. Q9.2

    Which of the sorting algorithm is better than other and why? Explain.

    Ask AI
  3. Q9.3

    Write C program for merge sort algorithm.

    Ask AI

2018100104

B.Tech 1st Semester Exam., 2018 (New)

3 hours70 marks

Instructions

  • All questions carry equal marks.
  • There are NINE questions in this paper.
  • Attempt FIVE questions in all.
  • Question No. 1 is compulsory.

Q.1 Choose the correct answer (any seven):

Ask AI
  1. Q1.1

    Which of these, best describes an array?

    a)

    A data structure that shows a hierarchical behaviour

    b)

    Container of objects of similar types

    c)

    Container of objects of mixed types

    d)

    All of the above

    Ask AI
  2. Q1.2

    How do you initialize an array in C?

    a)

    int arr[3] = (1,2,3);

    b)

    int arr(3) = {1,2,3};

    c)

    int arr[3] = {1,2,3};

    d)

    int arr(3) = (1,2,3);

    Ask AI
  3. Q1.3

    When does the segmentation fault occur?

    a)

    Compile-time

    b)

    Run-time

    c)

    Both of the above

    d)

    None of the above

    Ask AI
  4. Q1.4

    What is the output of the following program?
    void main(){
      int a;
      a=1;
      while(a<=1)
        if(a%2)
          printf("%d", a++);
        else
          printf("%d", ++a);
      printf("%d", a+10);
    }

    a)

    011

    b)

    012

    c)

    111

    d)

    112

    Ask AI
  5. Q1.5

    What is the output of the following code?
    void main()
    {
      int i;
      i=0;
      if(i=15,10,5)
        printf("Programming %d",i);
      else
        printf("Skills %d",i);
      getch();
    }

    a)

    Skills 15

    b)

    Programming 5

    c)

    Programming 15

    d)

    Skills 5

    Ask AI
  6. Q1.6

    What will be printed as the result of the operation below?
    main()
    {
      char s1[]="Cisco";
      char s2[]="systems";
      printf ("%s", s1);
    }

    a)

    System

    b)

    error

    c)

    Cisco

    d)

    Compilation fail

    Ask AI
  7. Q1.7

    Process of inserting an element in stack is called

    a)

    create

    b)

    push

    c)

    evaluation

    d)

    Pop

    Ask AI
  8. Q1.8

    Consider the following segment of C-code:
    int j, n;
    j=1;
    while (j<=n)
      j=j*2;
    The number of comparisons made in the execution of the loop for any n>0 is: (Base of log is 2 in all options)

    a)

    CEIL(log n)

    b)

    CEIL(log n)+2

    c)

    FLOOR(log n)+2

    d)

    n

    Ask AI
  9. Q1.9

    The minimum number of comparisons required to find the minimum and the maximum of 100 numbers is

    a)

    100

    b)

    200

    c)

    150

    d)

    148

    Ask AI
  10. Q1.10

    What is the output of following program?
    #include <stdio.h>
    int main()
    {
      int a=1;
      int b=1;
      int c=a || --b;
      int d=a-- && --b;
      printf("a=%d, b=%d, c=%d, d=%d", a, b, c, d);
      return 0;
    }

    a)

    a = 0, b = 1, c = 1, d = 0

    b)

    a = 0, b = 0, c = 1, d = 0

    c)

    a = 1, b = 1, c = 1, d = 1

    d)

    a = 0, b = 0, c = 0, d = 0

    Ask AI

Q.2 Solve this question :

Ask AI
  1. Q2.1

    How array and pointers are related? Explain with the help of suitable diagrams.

    Ask AI

Q.3 Solve both questions :

Ask AI
  1. Q3.1

    Write a C program to count the number lines input by the user.

    Ask AI
  2. Q3.2

    Explain the difference between call by reference and call by value with the help of a suitable example.

    Ask AI

Q.4 Solve this question :

Ask AI
  1. Q4.1

    With the help of an example, differentiate between static and dynamic memory allocations.

    Ask AI

Q.5 Solve this question :

Ask AI
  1. Q5.1

    What are library functions and their users in C language? Can we write our own functions and include them in C library?

    Ask AI

Q.6 Solve both questions :

Ask AI
  1. Q6.1

    Write a "recursive" C program to print—
    (a) Fibonacci series;
    (b) factorial of a given number.

    Ask AI

Q.7 Solve this question :

Ask AI
  1. Q7.1

    Write the differences between structure and union. Compare them with the help of an example.

    Ask AI

Q.8 Solve this question :

Ask AI
  1. Q8.1

    Write a C program to convert an infix expression into postfix expression. In particular, an infix expression: $(1-2)*(4+5)$ will have postfix expression: $12-45+*$.

    Ask AI

Q.9 Solve this question :

Ask AI
  1. Q9.1

    Write a C program to illustrate reading of data from a file.

    Ask AI

2018V4100104

B.Tech 1st Semester Exam., 2018 (New)

3 hours70 marks

Instructions

  • All questions carry equal marks.
  • There are NINE questions in this paper.
  • Attempt FIVE questions in all.
  • Question No. 1 is compulsory.

Q.1 Choose the correct answer (any seven):

Ask AI
  1. Q1.1

    Which of these, best describes an array?

    a)

    A data structure that shows a hierarchical behaviour

    b)

    Container of objects of similar types

    c)

    Container of objects of mixed types

    d)

    All of the above

    Ask AI
  2. Q1.2

    How do you initialize an array in C?

    a)

    int arr[3] = (1,2,3);

    b)

    int arr(3) = {1,2,3};

    c)

    int arr[3] = {1,2,3};

    d)

    int arr(3) = (1,2,3);

    Ask AI
  3. Q1.3

    When does the segmentation fault occur?

    a)

    Compile-time

    b)

    Run-time

    c)

    Both of the above

    d)

    None of the above

    Ask AI
  4. Q1.4

    What is the output of the following program?
    void main(){
      int a;
      a=1;
      while(a<=1)
        if(a%2)
          printf("%d", a++);
        else
          printf("%d", ++a);
      printf("%d", a+10);
    }

    a)

    011

    b)

    012

    c)

    111

    d)

    112

    Ask AI
  5. Q1.5

    What is the output of the following code?
    void main()
    {
      int i;
      i=0;
      if(i=15,10,5)
        printf("Programming %d",i);
      else
        printf("Skills %d",i);
      getch();
    }

    a)

    Skills 15

    b)

    Programming 5

    c)

    Programming 15

    d)

    Skills 5

    Ask AI
  6. Q1.6

    What will be printed as the result of the operation below?
    main()
    {
      char s1[]="Cisco";
      char s2[]="systems";
      printf ("%s", s1);
    }

    a)

    System

    b)

    error

    c)

    Cisco

    d)

    Compilation fail

    Ask AI
  7. Q1.7

    Process of inserting an element in stack is called

    a)

    create

    b)

    push

    c)

    evaluation

    d)

    Pop

    Ask AI
  8. Q1.8

    Consider the following segment of C-code:
    int j, n;
    j=1;
    while (j<=n)
      j=j*2;
    The number of comparisons made in the execution of the loop for any n>0 is: (Base of log is 2 in all options)

    a)

    CEIL(log n)

    b)

    CEIL(log n)+2

    c)

    FLOOR(log n)+2

    d)

    n

    Ask AI
  9. Q1.9

    The minimum number of comparisons required to find the minimum and the maximum of 100 numbers is

    a)

    100

    b)

    200

    c)

    150

    d)

    148

    Ask AI
  10. Q1.10

    What is the output of following program?
    #include <stdio.h>
    int main()
    {
      int a=1;
      int b=1;
      int c=a || --b;
      int d=a-- && --b;
      printf("a=%d, b=%d, c=%d, d=%d", a, b, c, d);
      return 0;
    }

    a)

    a = 0, b = 1, c = 1, d = 0

    b)

    a = 0, b = 0, c = 1, d = 0

    c)

    a = 1, b = 1, c = 1, d = 1

    d)

    a = 0, b = 0, c = 0, d = 0

    Ask AI

Q.2 Solve this question :

Ask AI
  1. Q2.1

    How array and pointers are related? Explain with the help of suitable diagrams.

    Ask AI

Q.3 Solve both questions :

Ask AI
  1. Q3.1

    Write a C program to count the number lines input by the user.

    Ask AI
  2. Q3.2

    Explain the difference between call by reference and call by value with the help of a suitable example.

    Ask AI

Q.4 Solve this question :

Ask AI
  1. Q4.1

    With the help of an example, differentiate between static and dynamic memory allocations.

    Ask AI

Q.5 Solve this question :

Ask AI
  1. Q5.1

    What are library functions and their users in C language? Can we write our own functions and include them in C library?

    Ask AI

Q.6 Solve both questions :

Ask AI
  1. Q6.1

    Write a "recursive" C program to print—
    (a) Fibonacci series;
    (b) factorial of a given number.

    Ask AI

Q.7 Solve this question :

Ask AI
  1. Q7.1

    Write the differences between structure and union. Compare them with the help of an example.

    Ask AI

Q.8 Solve this question :

Ask AI
  1. Q8.1

    Write a C program to convert an infix expression into postfix expression. In particular, an infix expression: $(1-2)*(4+5)$ will have postfix expression: $12-45+*$.

    Ask AI

Q.9 Solve this question :

Ask AI
  1. Q9.1

    Write a C program to illustrate reading of data from a file.

    Ask AI

Support BEUConnect

Contributions cover the domain and hosting.

UPI QR code for pritkr@cnrb
pritkr@cnrb

Add to home screen

  1. Tap Share in Safari.
  2. Choose Add to Home Screen.