-
remove pre and post incr in 'if'
-
add space after else if there is no if.
-
switch (omkar)
-
elseif(++i) (omkar - where to put assign i i , under which block)
-
ternary ops (omkar)
-
while(scanf("%d",&x)){} => output? (omkar)
-
int a=printf("%s\n", c); => output? (omkar)
-
sentinal for fn calls - kaleem "not required" bol raha hai
-
check assignments stmts in binary ops: for( ;k<3 && (i=j);)
assign i j loop k i 1 assign i j
-
pointers – same as arrays (omkar - pointer example)
-
procedures other than main
-
for loop cond section contains functions ? (same as above)
-
a[i][i][i] = a[i][i][i] + 1 ? => assign a i a (only used are output once... changed are printed times)
-
for loop initialization lines count if funciton is inside a for loop
-
a[++i] = j; => assign i i assign a i j
-
merge assign and multiassign fns
-
sed - remove multiple occurance of vars not changed in assignment stmts
-
int a[3], a[i];
-
int i = somefunction(a, b);
-
include handlePreUnary and PostUnary fns in for, while and assignment fns
-
if(i>4){ printf("%s\n", c); } else if( ++i){ scanf("%d", &n); } (omkar)
n. make compatible with input names
a = max(i, j); --- rcall max a i j max(i, j); call max i j reset(a); --- call reset a
a = i + j; a[i] = j;
max(a, max(b,c));
$1 = max(b,c)
max(a, $1)
====================
main :
a int
b array
c struct
...
functions call in printf() - ‘$i’ - $1 fine - parse output twice using sentinal
no cond var in for loop ? - direct no of lines
multiple invars - two versions of code
handle array decls.
arrays - ‘a[i] = j’ => assign a i j
handled fscanf and fprintf
handled multiple function declarations and definitions
handled preincrement and post increment ops in "if condition stmts" handled preincrement and post increment ops in array and variable declarations
handled function calls during assignment stmts
structure
multiple assignments in one statement.
int i = arr[++j];
int a = b+=c;