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); }
2 111932)#include
6)swap(int x,y) { int temp; temp=x; x=y; y=temp; } main() { int x=2;y=3; swap(x,y); } after calling swap ,what are yhe values x&y?
3 2050118)struct base {int a,b; base(); int virtual function1(); } struct derv1:base{ int b,c,d; derv1() int virtual function1(); } struct derv2 : base {int a,e; } base::base() { a=2;b=3; } derv1::derv1(){ b=5; c=10;d=11;} base::function1() {return(100); } derv1::function1() { return(200); } main() base ba; derv1 d1,d2; printf("%d %d",d1.a,d1.b) o/p is a)a=2;b=3; b)a=3; b=2; c)a=5; b=10; d)none 19) for the above program answer the following q's main() base da; derv1 d1; derv2 d2; printf("%d %d %d",da.function1(),d1.function1(),d2.function1 ()); o/p is a)100,200,200; b)200,100,200; c)200,200,100; d)none 20)struct { int x; int y; }abc; you can not access x by the following 1)abc-->x; 2)abc[0]-->x; abc.x; (abc)-->x; a)1,2,3 b)2&3 c)1&2 d)1,3,4
1 10673write a program to swap bits in a character and return the value prototype of function char fun (char a, charb flag c) where fun returns a char, char a is a the value char b is the bit to be changed and flag c is the bit value for eg: x=fun(45,7,0) since 45 is 0010 0101 and ow x should contain the value 65 (0110 0101)
1 7413How to add two numbers without using arithmetic operators?
College School Exams Tests, e track, Infosys, Pan Parag, Sapient, TCS,
18 44316Write a program to generate a pulse width frequency of your choise,which can be variable by using the digital port of your processor
3617
Hi how many types of software editions are there and their difference (like home editions, enterprise, standard etc) can u please help me
Explain how do you list a file’s date and time?
Given two strings S1 and S2. Delete from S2 all those characters which occur in S1 also and finally create a clean S2 with the relevant characters deleted.
write a c program for swapping two strings using pointer
where are auto variables stored? What are the characteristics of an auto variable?
hi send me sample aptitude papers of cts?
Explain what are the different file extensions involved when programming in c?
What are run-time errors?
What is a constant and types of constants in c?
any "C" function by default returns an a) int value b) float value c) char value d) a & b
Can you please explain the difference between exit() and _exit() function?
how to build a exercise findig min number of e heap with list imlemented?
Explain how can you avoid including a header more than once?
Difference between strcpy() and memcpy() function?
What is the right type to use for boolean values in c? Is there a standard type? Should I use #defines or enums for the true and false values?