Write one statement equalent to the following two statements x=sqr(a); return(x); Choose from one of the alternatives a.return(sqr(a)); b.printf("sqr(a)"); c.return(a*a*a); d.printf("%d",sqr(a));
6 10644Which of the following about the C comments is incorrect ? a.commentscan go over multiple lines b.comments can start any where in the line c.a line can contain comments with out any language statements d.comments can occur within comments
6 13272Which of the following is not an infinite loop ? a.while(1){ .... } b.for(;;){ ... } c.x=0; do{ /*x unaltered within theloop*/ ... }while(x==0); d.# define TRUE 0 ... while(TRUE){ .... }
7 23412what does the following function print? func(int i) { if(i%2)return 0; eale return 1; } main() { int =3; i=func(i); i=func(i); printf("%d",i);}
9 18402how does the C compiler interpret the following two statements p=p+x; q=q+y; a.p=p+x; q=q+y b.p=p+xq=q+y c.p=p+xq; q=q+y d.p=p+x/q=q+y
4 19512read the folllowing code
# define MAX 100
# define MIN 100
....
....
if(x>MAX)
x=1;
else if(x
a memory of 20 bytes is allocated to a string declared as char *s then the following two statements are executed: s="Etrance" l=strlen(s); what is the value of l ? a.20 b.8 c.9 d.21
4 11758given the piece of code int a[50]; int *pa; pa=a; to access the 6th element of the array which of the following is incorrect? a.*(a+5) b.a[5] c.pa[5] d.*(*pa + 5)
6 28715consider the following structure: struct num nam{ int no; char name[25]; }; struct num nam n1[]={{12,"Fred"},{15,"Martin"},{8,"Peter"},{11,Nicholas"}}; ..... ..... printf("%d%d",n1[2],no,(*(n1 + 2),no) + 1); What does the above statement print? a.8,9 b.9,9 c.8,8 d.8,unpredictable value
4 9668identify the in correct expression a.a=b=3=4; b.a=b=c=d=0; float a=int b=3.5; d.int a; float b; a=b=3.5;
8 14364regarding the scope of the varibles;identify the incorrect statement: a.automatic variables are automatically initialised to 0 b.static variables are are automatically initialised to 0 c.the address of a register variable is not accessiable d.static variables cannot be initialised with any expression
1 7764what is y value of the code if input x=10 y=5; if (x==10) else if(x==9) elae y=8; a.9 b.8 c.6 d.7
4 10623what does the following code do? fn(int n,int p,int r) { static int a=p; switch(n){ case 4:a+=a*r; case 3:a+=a*r; case 2:a+=a*r; case 1:a+=a*r; } } a.computes simple interest for one year b.computes amount on compound interest for 1 to 4 years c.computes simple interest for four year d.computes compound interst for 1 year
7 11188Post New TCS C Interview Questions
How do you enable flash fill in excel?
what is diversion?
Explain fetch api in javascript?
Explain about recording in uipath studio?
Explain the Role of Editor in Joomla?
Define truncate and delete commands?
A PLC is programmed to drive three motors A, B and C as follows : After running motor A for an hour, motor B should get ON and motor A should get OFF. And after running motor B for an hour, motor C should get ON and motor B should get OFF. And after running motor C for an hour, motor A should get ON and motor C should get OFF. (That is, a cyclic repetition with time period one hour) Now, the second condition is: If any motor gone faulty and is tripped, the consecutive motor should get ON and the faulty (tripped) motor should be eliminated from cyclic repetition. The remaining two motors should bear the cyclic repetition of one hour each. (For healthy motor take logic as high and for tripped motor take logic as low) Now, the third condition is: When motor A load(Amps) exceeds 60% of its rated load, motor B should get ON in parallel to motor A. And when both motors A & B are running in parallel, and if their load exceeds 60% of their rated load, motor C should also start in parallel to A & B. [Here the cyclic repetition is eliminated, until their loads become normal(40%)] [Take logic high(1) for load at 60% and logic low(0) for load at 40%] Now draw a flow chart or a ladder diagram to fulfill the above condition.
Explain me does de-activated plugins slow down a wordpress site?
How can you disable wordpress comment?
Introduce yourself in 5 lines.
How big does hana scale?
If i can use sys.check_constraints to display my constraints from my database using sql server 2005, how can i display then if i am using sql server 2000????
What do ember.js components specify?
how will you find the inode number?
What is the purpose of an xml file?