C language interview questions solution for freshers beginners placement tricky good pointers answers explanation operators data types arrays structures functions recursion preprocessors looping file handling strings switch case if else printf advance linux objective mcq faq online written test prime numbers Armstrong Fibonacci series factorial palindrome code programs examples on c++ tutorials and pdf
if given a string in command line abc123DEF.the output should be ABC321def. i.e, if letters are in lower-case it must be converted to upper-case or viceversa and the numbers present in a string should be reversed.
Write the function called my price. The function will produce a retail selling price table for products base on their wholesale price. The function will receive 3 integers. The first integer is the wholesale price. The second integer is amount the wholesale price will be increased each time. The third integer indicates many iterations are going to be produced. Each line create a table display the wholesale price followed by 3 retail price that are 10%, 20% and 30% higher the wholesale price.
Write a c program that display the varieties of meals to the user with their respective price, base on the particular meal choosing by the user the system must alert the user to request for the quantity of the meal and display the total amount of the meal ordered. using switch case
It will print Casabance as output. Because consider the following examples switch(*("A")) points to case 'A' switch(*(1+"ABC")) points to case 'B' switch(*(2+"ABC")) points to case 'C' switch(*(2+"AB" "XY")) points to case 'X' switch(*(1+"AB" "CD"+1)) is same as switch(*(2+"ABCD") and it points to case 'C' Because "ABCD" is a constant string and "ABCD" gives the address(pointer) of that string. If we add 2 to this address it points to 3ed character in the string "ABCD" and it comes as 'C'. So your program prints Casabance.
It will print Casabance as output. Because consider the following examples switch(*("A")) points to case 'A' switch(*(1+"ABC")) points to case 'B' switch(*(2+"ABC")) points to case 'C' switch(*(2+"AB" "XY")) points to case 'X' switch(*(1+"AB" "CD"+1)) is same as switch(*(2+"ABCD") and it points to case 'C' Because "ABCD" is a constant string and "ABCD" gives the address(pointer) of that string. If we add 2 to this address it points to 3ed character in the string "ABCD" and it comes as 'C'. So your program prints Casabance.
void main() { int a=3,b=2; a=a==b==0; // '==' works as conditional checking. It is FALSE so returned 0 store in a. // Now the value of a is ZERO. switch(1){ a=a+10; // Here this statement will not execute. So 'a' value does not changed } sizeof(a++); // Here we are incrementing 'a'. So ZERO becomes one printf("%d",a); }
39 comments:
pls provide the solutions soon........
solution
Hi Mayank,
I will publish the solution today
can contact me for explanation doubts and solution
280 is beyond the range of unsigned char. Its corresponding cyclic value is: 24
can anyone explain cyclic value of char,integer when it crosses its range...
i can explain cyclic value of char,integer when it crosses its range... contact me on 9550891364
nice job...give us some more qs.....
till now i did't see such a kind of website for c language...... really superb....
in Q2 movie<<2+movie
what is the meaning of <<.
can we use continue in switch
write programme enter your choice some alphabate letter and findout alphabate is vowel or consonant?
using switch case
in case logical operator can't be used thats' why give compilation error but in Q 8 u give the reason : case duplicacy.
is bitwise operator will use in case.
plz explain.on my id............
sachingrover2@gmail.com
plz explain question 6 *("CD")='C'
in case logical operator can't be used thats' why give compilation error but in Q 8 u give the reason : case duplicacy.
is bitwise operator will use in case.
This question always arise i can also same doubt
ple explain these details in my email id msraman1991@yahoo.com
Good Ques
please explain question no.6
how *(2+"ABCD")=*("CD")
='C'
Really i an unable 2 understand....
can i download the questions and some of the tutorials
Yes, Sure
Q.9 Type cast is not allowed in switch case.It creates an error.
if given a string in command line abc123DEF.the output should be ABC321def.
i.e, if letters are in lower-case it must be converted to upper-case or viceversa and the numbers present in a string should be reversed.
can any body help me.....
nice, good job!
Write the function called my price. The function will produce a retail selling price table for products base on their wholesale price. The function will receive 3 integers. The first integer is the wholesale price. The second integer is amount the wholesale price will be increased each time. The third integer indicates many iterations are going to be produced. Each line create a table display the wholesale price followed by 3 retail price that are 10%, 20% and 30% higher the wholesale price.
please explain: how
*(2+"ABCD")=*("CD")
='C'
??
can u plz explain the last solution...why the value is is unaffected even after (a++ in switch)
good job
Write a c program that display the varieties of meals to the user with their respective price, base on the particular meal choosing by the user the system must alert the user to request for the quantity of the meal and display the total amount of the meal ordered. using switch case
Please explain question : 6 though u give the explanation i m unable to understand.. anyone who knows plz reply
ques-2 how calculate (movie<<movie+1)
*(2+"ABCD")=*("CD")
='C' how come ??????
It will print Casabance as output.
Because consider the following examples
switch(*("A")) points to case 'A'
switch(*(1+"ABC")) points to case 'B'
switch(*(2+"ABC")) points to case 'C'
switch(*(2+"AB" "XY")) points to case 'X'
switch(*(1+"AB" "CD"+1)) is same as switch(*(2+"ABCD") and it points to case
'C'
Because "ABCD" is a constant string and "ABCD" gives the address(pointer) of
that string. If we add 2 to this address it points to 3ed character in the
string "ABCD" and it comes as 'C'.
So your program prints Casabance.
It will print Casabance as output.
Because consider the following examples
switch(*("A")) points to case 'A'
switch(*(1+"ABC")) points to case 'B'
switch(*(2+"ABC")) points to case 'C'
switch(*(2+"AB" "XY")) points to case 'X'
switch(*(1+"AB" "CD"+1)) is same as switch(*(2+"ABCD") and it points to case
'C'
Because "ABCD" is a constant string and "ABCD" gives the address(pointer) of
that string. If we add 2 to this address it points to 3ed character in the
string "ABCD" and it comes as 'C'.
So your program prints Casabance.
Shift operator
Continue has to be used only in loops like for, while.... etc; But switch case is not a loop
void main()
{
int a=3,b=2;
a=a==b==0; // '==' works as conditional checking. It is FALSE so returned 0 store in a.
// Now the value of a is ZERO.
switch(1){
a=a+10; // Here this statement will not execute. So 'a' value does not changed
}
sizeof(a++); // Here we are incrementing 'a'. So ZERO becomes one
printf("%d",a);
}
i want to choose upper case and lower case character from input to user
then how to logic implement this program
eg:-
A-Addition
a-addition
Can someone please explain Question 16?
How to create a Rewards and Recognition program for a company? We are food sweethearts and enthusiastic issue solvers. We are on the excursion of reconsidering and re-designing what food at work environments can turn into. workplace cafe experience
Informative and very helpful C Programming articles... keep posting...
Online Digital marketing Course and services
https://www.startupicons.in/
Post a Comment