b) 4 c) 6 d) 7
32. Any C program
a) must contain at least one function b) need not contain
ant function
c) needs input data d) none of the above
33. Using goto inside for loop is equivalent to using
a) continue b) break c) return d)none of the above
34. The program fragment
int a=5, b=2;
printf(“%d”,a+++++b);
a) prints 7 b)prints 8 c) prints 9 d)none of the above
35. printf(“ab” , “cd”,”ef”); prints
a) ab abcdef c) abcdef, followed by garbage value d) none of
the above
36. Consider the following program segment.
i=6720; j=4;
while((i%j)==0)
{
i=i/j;
j=j+1;
}
On termination j will have the value
a) 4 b) 8 c) 9 d) 6720
Answer / priyanka
any c program must contain atleast one fuction which is called main()
| Is This Answer Correct ? | 19 Yes | 3 No |
how does the for loop work actually..suppose for the following program how it ll work plz explain to me for(i=5;i>=0;i--) prinf(i--);
What are variables and it what way is it different from constants?
Why is a semicolon (;) put at the end of every program statement?
what will be maximum number of comparisons when number of elements are given?
what is the different between if-else and switch statment (other than syntax)
26 Answers CTS, Oracle, Scorpos,
Explain how can I convert a number to a string?
macros and function are related in what aspect? a)recursion b)varying no of arguments c)hypochecking d)type declaration
12 Answers HCL, Infosys, Microsoft,
What is the difference between malloc calloc and realloc in c?
main() { struct s1 { char *str; struct s1 *ptr; }; static struct s1 arr[] = { {"Hyderabad",arr+1}, {"Bangalore",arr+2}, {"Delhi",arr} }; struct s1 *p[3]; int i; < BR> for(i=0;i<=2;i++) p[i] = arr[i].ptr; printf("%s ",(*p)->str); printf("%s ",(++*p)->str); printf("%s ",((*p)++)->str); }
What will be printed as the result of the operation below: #include<..> int x; int modifyvalue() { return(x+=10); } int changevalue(int x) { return(x+=1); } void main() { int x=10; x++; changevalue(x); x++; modifyvalue(); printf("First output:%d\n",x); x++; changevalue(x); printf("Second output:%d\n",x); modifyvalue(); printf("Third output:%d\n",x); }
What are qualifiers and modifiers c?
Why we use int main and void main?