LAISHA
Open Laisha

ICAR AIEEA-PG Computer Programming, Data Structures & Agricultural Informatics: practice questions

ICAR AIEEA-PG — Agricultural Engineering & Technology (Major Subject Group 10) · India · National Testing Agency for ICAR

Original practice questions written to the published syllabus · not past papers
10worked here, free
108written to this exam in this subject
8syllabus units

What this subject covers

Programming, data and the basics of AI as used in agricultural engineering, from spreadsheets to decision support systems.

In the exams: Core in the ICAR 6th Deans' Committee B.Tech; ICAR AIEEA-PG Unit II (fundamentals of computers)

What ICAR AIEEA-PG asks from it

ICAR AIEEA-PG — Agricultural Engineering & Technology (Unit II)

Unit II names computers alongside electric motors, instruments and power distribution. Papers are not published, so emphasis cannot be counted; the syllabus supports short single-answer MCQs on computer organisation and memory, number systems and two's complement, flowchart symbols and algorithm properties, the output of a short code fragment, operators and integer division, data structures (stack, queue, tree traversal), database keys, normal forms and SQL clauses, and basic AI and ML vocabulary. With +4/−1 marking, exact definitions and careful tracing are worth more than broad reading.

Where the 108 questions fall

How our questions for ICAR AIEEA-PG spread across the units of Computer Programming, Data Structures & Agricultural Informatics. Difficulty: 37 easy, 52 medium, 19 hard.

Programming in C or Python24
Introduction to artificial intelligence and machine learning22
Data structures14
Algorithms and flowcharts13
Databases12
Spreadsheets for engineering calculations8
Decision support systems8
Agricultural apps and IoT data7

10 practice questions, worked

Choose an answer, then open the working. Each explanation says why the right answer is right and why the others are not.

1 · Algorithms and flowcharts · easy

A program keeps halving an interval to locate a root but contains no test to end the loop. Which of Knuth's algorithm properties is missing?

  1. Definiteness
  2. Effectiveness
  3. Generality of input
  4. Finiteness
Answer and working

D. Finiteness

Without a stopping condition the procedure never terminates, so finiteness fails. Each halving step is still precisely defined (definiteness) and basic enough to perform (effectiveness).

Further reading: Knuth, The Art of Computer Programming, Vol. 1; ISO 5807

2 · Algorithms and flowcharts · medium

The binary number 1101 0110 (unsigned) is written in hexadecimal and in decimal as:

  1. B6 and 182
  2. 6D and 109
  3. D6 and 214
  4. D6 and 196
Answer and working

C. D6 and 214

Group into four-bit nibbles: 1101 = D, 0110 = 6, so D6. Decimal = 13 × 16 + 6 = 214. Reading the nibbles in reverse gives 6D (109); 196 is C4; B6 mistakes 1101 for 1011.

Further reading: Standard computer-fundamentals texts

3 · Programming in C or Python · medium

What does print(0.1 + 0.2 == 0.3) display in Python, and why?

  1. An error, because the == operator cannot compare two float values
  2. True, because both sides are stored internally as exactly 0.3
  3. True, because Python rounds every float sum to fifteen decimal places
  4. False, because 0.1 and 0.2 have no exact binary floating-point form
Answer and working

D. False, because 0.1 and 0.2 have no exact binary floating-point form

IEEE 754 doubles store 0.1 and 0.2 approximately; their sum is 0.30000000000000004, which differs from the stored 0.3. Python does not round sums, and == works on floats; compare with a tolerance such as abs(a − b) < 1e-9 instead.

Further reading: IEEE 754; Python Language Reference (docs.python.org)

4 · Programming in C or Python · hard

A program integrates a runoff hydrograph by the trapezoidal rule. Discharges at hourly intervals are 0, 4, 10, 6, 2 and 0 m³/s. What runoff volume does it compute?

  1. 79,200 m³
  2. 39,600 m³
  3. 1,320 m³
  4. 158,400 m³
Answer and working

A. 79,200 m³

h = 3600 s. V = h[Q0/2 + Q1 + Q2 + Q3 + Q4 + Q5/2] = 3600 × 22 = 79,200 m³. Halving every ordinate gives 39,600; using h = 60 (minutes as seconds) gives 1,320; 158,400 forgets the ½ in the h/2 factor.

Further reading: Chapra and Canale, Numerical Methods for Engineers

5 · Data structures · medium

Keys 50, 30, 70, 20, 40, 60, 80 are inserted in that order into an empty binary search tree. What is the preorder traversal?

  1. 20 40 30 60 80 70 50
  2. 20 30 40 50 60 70 80
  3. 50 30 20 40 70 60 80
  4. 50 30 70 20 40 60 80
Answer and working

C. 50 30 20 40 70 60 80

The tree has 50 at the root, 30 (children 20, 40) on the left and 70 (children 60, 80) on the right. Preorder visits node, left, right: 50 30 20 40 70 60 80. 20 30 40 50 60 70 80 is the inorder (sorted) traversal, 20 40 30 60 80 70 50 the postorder, and the insertion order is the level-order traversal.

Further reading: Cormen et al., Introduction to Algorithms

6 · Data structures · medium

Why is reaching the k-th element of a singly linked list slower than reaching the k-th element of an array?

  1. The list keeps a hash of every element, and computing that hash takes time proportional to k
  2. The list stores its nodes in contiguous memory, so each access must first sort the nodes
  3. The list must be walked node by node from the head, which takes time proportional to k
  4. The list can be read only from its tail end, so the whole list must be reversed each time
Answer and working

C. The list must be walked node by node from the head, which takes time proportional to k

Array elements are contiguous, so element i sits at base + i × size and is reached in constant time. Linked-list nodes are scattered and joined by pointers, so reaching node k takes k steps. Linked lists are not contiguous, not hashed, and are walked from the head.

Further reading: Cormen et al., Introduction to Algorithms

7 · Spreadsheets for engineering calculations · easy

A spreadsheet reports a circular reference in cell F9. What does this mean?

  1. A formula in F9 depends, directly or through other cells, on its own value
  2. F9 refers to a cell on a different sheet that has since been deleted
  3. F9 is a merged cell that spans more than one row and column
  4. F9 contains a number formatted as text, so it cannot be summed
Answer and working

A. A formula in F9 depends, directly or through other cells, on its own value

A circular reference is a dependency loop; it is usually an error unless iterative calculation was enabled on purpose for an implicit equation. A deleted reference gives a reference error, and text-formatted numbers or merged cells are different problems.

Further reading: Spreadsheet program documentation; standard engineering spreadsheet practice

8 · Introduction to artificial intelligence and machine learning · easy

A model is trained on past records of rainfall, fertiliser and sowing date, each labelled with the yield obtained (t/ha), to predict yield for new fields. What kind of learning task is this?

  1. Unsupervised clustering
  2. Supervised regression
  3. Reinforcement learning
  4. Supervised classification
Answer and working

B. Supervised regression

The examples carry known answers (supervised) and the answer is a number (regression). Classification predicts categories; clustering has no labels; reinforcement learning learns from rewards through interaction.

Further reading: Hastie, Tibshirani and Friedman, The Elements of Statistical Learning

9 · Agricultural apps and IoT data · medium

A 12-bit analogue-to-digital converter measures 0 to 3.3 V. Taking resolution as range/2^n, what voltage does one count represent?

  1. 0.403 mV
  2. 3.223 mV
  3. 275 mV
  4. 0.806 mV
Answer and working

D. 0.806 mV

2^12 = 4096 levels, so 3.3 V/4096 = 0.806 mV per count. 3.223 mV is a 10-bit converter; 275 mV divides by the number of bits instead of the number of levels. 0.403 mV divides by 2^13.

Further reading: FAO and ITU, E-agriculture Strategy Guide; standard data-acquisition texts

10 · Agricultural apps and IoT data · medium

A vibration signal on a pump contains frequencies up to 50 Hz. According to the sampling theorem, what sampling rate is needed to avoid aliasing?

  1. Exactly 50 samples per second
  2. One sample per second is enough
  3. More than 25 samples per second
  4. More than 100 samples per second
Answer and working

D. More than 100 samples per second

The sampling rate must exceed twice the highest frequency present (the Nyquist criterion): more than 2 × 50 = 100 Hz. Sampling at 50 Hz or below makes the 50 Hz component appear as a false lower frequency.

Further reading: FAO and ITU, E-agriculture Strategy Guide; standard data-acquisition texts

Ten here, 108 in the app. The Laisha app has every practice question we have written to ICAR AIEEA-PG in this subject, marked as you go, with timed papers, a jump-to-unanswered list and a certificate when you pass at 70 per cent.

Free for ten days, then one subscription of US$10 a month. We would rather say so here than have you find it later.

Practise the full set in Laisha →

Read the subject

Computer Programming, Data Structures & Agricultural InformaticsThe full study manual, free ICAR AIEEA-PGFormat, sections and how it has changed

More ICAR AIEEA-PG practice

Surveying & LevellingEngineering MathematicsEngineering ThermodynamicsHydraulic Drives & ControlsWatershed HydrologySoil Science for EngineersPost-Harvest Engineering of Horticultural CropsMachine DesignFluid Mechanics & Open Channel HydraulicsTheory of MachinesSoil MechanicsBio-energy Systems: Design & ApplicationsProbability, Statistics & Data AnalysisStrength of MaterialsRenewable Energy Sources (Solar, Wind)Electrical Machines & Power UtilisationIrrigation Engineering (Soil-Water-Plant, Conveyance, Surface Methods)Groundwater, Wells & PumpsWatershed Planning & ManagementRefrigeration, Air-Conditioning & Cold-Chain EngineeringEngineering Properties of Agricultural ProduceWater Resources Management, Floods & Canal SystemsEngineering Mechanics (Statics & Dynamics)Sprinkler & Micro-Irrigation Systems

Ask Laisha about this

Opens Laisha's chat with your question ready to send. Sign in or start free.