Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

What is the error in the following code? int function(int a) { return 1; } int main() { int x=0; printf(%d, function0); return 0; 3

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

What is the error in the following code? int function(int a) \{ return 1; \} int main() \{ int x=0; printf("\%d", function0); return 0; 3 a. printf("\%d", function(0); should be corrected as printf("\%d", function( (x) ); b. function is returning 1 c. function cannot be called inside printf statement d. No error Given below prototype of a function: void myfunc(int a, float b, int M[] ); and assuming the declaration: int A[10],x=4,y=0; float k; Which of the following is a valid call to the function? a. myfunc (A,x,k); b. y=myfunc(x,k,A); c. y=myfunc(A,x,k); d. myfunc (x,k,A); Which one is an invalid array initialization? a. int a[5]={1,2,3,4,5}; b. int a[4]={1,2,3,4,5}; c. int a[6]={1,2,3,4,5}; d. int a[]={1,2,3,4,5}; Given the following code, at which line there is an error? 1. \#include stdio.h 2. int main(void) 3. \{ 4. int a[2][2], x,y; 5. for (x=0;x

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions