Data Structures (Odd Semester 2014): Difference between revisions

From COEP Wiki
Jump to navigation Jump to search
Created page with "CT 205 Data Structures is offered to S.Y. B.Tech. Computer Engineering and I.T. students. It is a 4 credit course. The laboratory course CT 209 Data Structures Laboratory is a 2 credit course. = Common Mistakes by Students in Assignments Submission = == Writing the NUL character == The NUL character is written as '\0' and not as '/0' == Copying pointers == When you say p = q, where p and q are both pointers, then p does not point to q, but p points to where q points...."
 
(No difference)

Latest revision as of 13:29, 12 August 2025

CT 205 Data Structures is offered to S.Y. B.Tech. Computer Engineering and I.T. students. It is a 4 credit course. The laboratory course CT 209 Data Structures Laboratory is a 2 credit course.

Common Mistakes by Students in Assignments Submission

Writing the NUL character

The NUL character is written as '\0' and not as '/0'

Copying pointers

When you say p = q, where p and q are both pointers, then p does not point to q, but p points to where q points. E.g.
int a, *p, *q;
q = &a;
p = q;
means p points to a

Forgetting use of & in scanf

scanf expects the caller to pass the address of a variable in which scanf will store data. Students often forget to do it for non-array variables (for arrays, the name itself is the address) For example:
int i;
scanf("%d", i)
instead of
scanf("%d", &i);

Using O and Omega Notation in wrong place

The right way of using O and Omega notation is f(n) = O(g(n))
Students often write it as O(f(n)) = g(n)

Another common mistake is writing
O is n or O = n
The correct way of saying it is f(n) = O(n)