C Programming

Category: Gate CSE

C Programming

Category: Gate CSE
₹3,500.00 ₹9,000.00
Cinque Terre
Instructor
Chekuri Srikanth Varma

Gate CSE : C Programming
Chapters : 17


C language Tutorial with programming approach for beginners and professionals, helps you to understand the C language tutorial easily. Our C tutorial explains each topic with programs.

The C Language is developed for creating system applications that directly interact with the hardware devices such as drivers, kernels, etc.

C programming is considered as the base for other programming languages, that is why it is known as mother language.

It can be defined by the following ways:

  1. Mother language
  2. System programming language
  3. Procedure-oriented programming language
  4. Structured programming language
  5. Mid-level programming language
Course Features
Lectures
40
Duration
15+ Hours of content
Skill level
Easy
Language
English
Assessments
Yes

Cinque Terre

QUALIFICATION: Masters from IISC Bangalore PROFESSIONAL EXPIERENCE: 9+ years of Experience( Yahoo Labs, Matherix Labs Co-founder and Amazon)

C Programming

Category: Gate CSE
₹3,500.00 ₹9,000.00
Cinque Terre
Instructor
Chekuri Srikanth Varma

8 Comment(s)

Avatar Avyush Pandey  3 Votes

int main()
{
int i=8;
i=i++;
printf("%d",i);
return 0;
}
why its answer is 8? it should be 9

Login to reply
Avatar Instructor 

Because it is post increment operator. Initially i=8 and in second line i=i++ ; i.e. i= 8++; before semi colon it's value will be 8 only so 8 will be stored in i. and in third line printf("%d", i); value of i is printing so it will print 8. but if you write i ++; and
print (i) in second line then it will give value 9.

Login to reply
Avatar Cherukuri Venkta Sai Narendra 

sir here "i" will get two values 8,9 how come only 8 is being printed because post increment says first copy the value and then increment so now i=8 is copied ,after copying i will be incremented to 9 now since we are printing i so i should be 9 but here 8 is printed so the incremented value of i i.e 9 where will it be stored??

Login to reply
Avatar Instructor GATE 

The C programming language has undefined behaviour it can get tricky in few cases refer the below stack overflow link for more clarity and other such cases.
https://stackoverflow.com/questions/949433/why-are-these-constructs-using-pre-and-post-increment-undefined-behavior

Login to reply

Avatar Arun Dhakad  2 Votes

Is File topic is there in GATE syllabus?

Login to reply
Avatar Instructor 

No, it is not in the gate syllabus under C Programming.
Following are the topics which comes under the syllabus of C Programming
" Programming in C. Recursion. Arrays, stacks, queues, linked lists, trees, binary search
trees, binary heaps, graphs".

Login to reply

Avatar Amit Sharma  0 Votes

Recommend Book for maximum solved questions related to Pointers, Strings

Login to reply
Avatar Mentors GATE 

Understanding pointers in C by Yashwant Kanethkar is a good book chapter 1-3 will build your understanding, it contains many examples and problems.

Login to reply

© 2019 - All rights are reserved- AAIC Technologies pvt ltd