Professional Documents
Culture Documents
Lecture 2 Sep 24 2019
Lecture 2 Sep 24 2019
Lecture 2 Sep 24 2019
x = x + 3;
printf(“%d", x);
printf(“%d", x*6);
printf(“%d", x);
getchar();
return 0;
}
Dr. Muhammad Yousaf Hamza
#include <stdio.h>
int main( )
{
int x;
x = 5;
printf(“%d", x); // 5
x = x + 3;
printf(“%d", x); // 8
printf(“%d", x*6); // 48
printf(“%d", x); // 6
getchar();
return 0;
}
Dr. Muhammad Yousaf Hamza
Punctuation
Punctuations as semicolons, colons, commas,
apostrophes, quotation marks, braces,
brackets, and parentheses will also be used in
C code.
; : , ‘ “ [ ] { } ( )
details etc.
• Non-executable statement.
printf(“%d", z);
getchar();
return 0;
}
Ans: 2
// x will tell how many values scanned.